Questions tagged as 'python-2.7'

0
answers

How to keep the connection constant with the server?

I have an application made entirely in python where it connects to a server ... import MySQLdb db = MySQLdb.connect(host = '...' , user = '...' , passwd = '...' , db = '...' ) The connection is done well as long as the system is used con...
asked by 24.10.2018 / 21:11
0
answers

'int' object has no attribute '_getints'

Good evening, I'm new to programming, I'm trying to do the following thing, to do a gif in a new window, but I skip the following error. 'int' object has no attribute '_getints' def Animacion(): win=Toplevel win.minsize(900,300) im...
asked by 05.11.2018 / 03:09
0
answers

Problem with numpy meshgrid

I am stuck in a problem with matplotlib and using numpy.meshgrid. I have a 3D mesh of points called "grid3" in format x, y, z, pot. The point mesh is organized in the following way: x = grid3[:,0] y = grid3[:,1] z = grid3[:,2] pot = grid3[:,3]...
asked by 28.10.2018 / 17:14
1
answer

Problem with Fibonacci recursion

Hello, very recently we started with recursion and I do not understand it very much, they ask to create a program that makes the fibonacci succession but in several cases it gives me another value #Fibonacci def fibonacci(n): if n==1 or n...
asked by 15.10.2018 / 23:18
0
answers

ComboBox in Python 2.7.x

I'm starting in python and well I'm trying to put a ComboBox with ttk but I have a problem and I try to use the methods of the ComboBox but I generate error, according to no such method. I have been reading the documentation, and I have read...
asked by 14.10.2018 / 01:34
1
answer

global name 'K_ENTER' is not defined

That error comes to me when I try to press the enter or even when I want to press the space I get the same error ... def Menu(): #Llama a la variable global dificultad global dificultad #Carga y guarda la imagen de la carpeta dibujo...
asked by 10.10.2018 / 07:32
1
answer

How do I correct the error "Non-ASCII character '\ xe2' in file ... but no encoding declared"?

I am using Python 2.7 to run a program that is in Python 3.6. I added it to the interpreters but I still see this error:    File "/ Users / a / Desktop / project porgramacion 2 / proyecto.py", line 17   SyntaxError: Non-ASCII character '\ xe2...
asked by 19.06.2018 / 02:43
0
answers

What does "libpng warning: iCCP: known incorrect sRGB profile" mean?

The game works and everything but once you lose or win this message seems to you in the compiler (In my case I use spyder) libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iC...
asked by 09.10.2018 / 23:39
1
answer

How does self work in python? [duplicate]

I would like to know how self works in python, I know that it has to do something with the classes but I do not have it so clear and I need to know to convert it into an arrangement, here there is little of the code class Button(pygame.sprit...
asked by 07.10.2018 / 04:44
0
answers

UnicodeDecodeError: 'ascii' codec can not decode byte 0xc3 in position 18: ordinal not in range (128)

Well no idea what happened, change the code to another folder to send it and I have given these errors No se puede cargar imagen: mmempty.png Traceback (most recent call last): File "C:\Python27\lib\site-packages\IPython\core\interactiveshell...
asked by 08.10.2018 / 21:28