Questions tagged as 'python'

1
answer

Boolean word palindroma in Python

Could someone give me an explanation about why this Palindromas words reoccurrence software does not work in Python? def palindromo(cadena): num_letras = len(cadena) - 1 # te da el numero da caracteres -1 for i in range(len(...
asked by 04.11.2018 / 05:47
1
answer

Errno 99 Can not assign requested address Request Method: POST Request URL

I get the following error when doing a user registration in django-rest-framework using the path / rest-auth / registration / [Errno 99] Can not assign requested address Request Method: POST Request URL: link Django Version: 1.11.2 Python...
asked by 09.11.2018 / 15:48
2
answers

Go through a file several times to make an FTP connection

I need to go through the file login.txt several times, as many times as users have (in this case I only have one user) with open("login.txt") as fichero: dirServer = fichero.readline().split(":")[1].strip() usuario = fichero.rea...
asked by 31.10.2018 / 10:36
0
answers

MultiValueDictKeyError: "'products'"

I do not know why I do not recognize my products as I solve my error, my version is 2.7 of python thanks in advance views.py def comprar(request): productos = literal_eval(request.POST["productos"]) pago = literal_eval(request....
asked by 20.11.2018 / 02:58
0
answers

How to import models from one folder to another?

the structure of my program is as follows PAP -carpetaP --carpeta1 ---models --carpeta2 ---models In models of folder1 I have some models of tables that I need for the models in the folder2 I've already tried: from folderP.folder1.models im...
asked by 31.10.2018 / 00:04
1
answer

Problem with the login Raspberry Pi (Waiting for X server to shutdown (II) server terminated successfully.) Closing log file.ion to X server lost

I have this little problem with my raspberry, just restart it and when I try to login, it returns me to the same login screen, it does not throw any error of login when trying to do Startx from the terminal it returns me to the sam...
asked by 30.10.2018 / 19:07
0
answers

Change the port of an endpoint with the Python SOAP client - Zeep

Excuse me, I have an endpoint which shows me certain web services, said endpoint is the following: wsdl=" link " The problem is that, at the moment of wanting to obtain the client to be able to obtain the web services, the zeep.Client ()...
asked by 30.10.2018 / 00:57
0
answers

Generate Pdf in Django

someone can help me generate a pdf with django, but I want the pdf to be saved in a server path and not downloaded to the client machine. I currently have this: def pdf_export(request,pac_id): orden = OrdenPaciente.objects.get(id=pac_id) fi...
asked by 29.10.2018 / 18:23
0
answers

insert a record in python

I have the following algorithm where I have several modules and they ask me to do one that is to insert but I do not understand what it means to insert it may not be understood what I ask but any help serves class PUNTERO(): def __init__(s...
asked by 28.10.2018 / 05:33
0
answers

Error TIMEOUT Exception in Python using the googlemaps package

I would like to obtain the coordinates from a series of addresses. After running the code it shows me the following error after in time, it does not return the coordinates sometimes just for the first address. I do not know if it's a problem...
asked by 29.10.2018 / 17:00