Questions tagged as 'python-3.x'

0
answers

virtualenv creates two python and python3 files

at the time I created a virtual environment and tried to activate it, I said that the "activate" file did not exist, when I entered the folders to see what was happening, I did not have any file other than one that said python and another that s...
asked by 02.11.2018 / 17:02
0
answers

TypeError: can not unpack non-iterable NoneType object

I have a function that after making several calculations ends with 3 float variables. When I return them I get the following error, what does it mean?    TypeError: can not unpack non-iterable NoneType object def funcion(): ... a =...
asked by 02.11.2018 / 19:14
0
answers

TypeError: append () takes exactly one argument (2 given)

Hello colleagues, you could tell me why it appears in this code when I run it: TypeError: append() takes exactly one argument (2 given) when I add the positions in list 3. And another thing: whenever I take out cousins, programs work w...
asked by 03.11.2018 / 22:35
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
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

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

how to call style file from javascript

I'm doing the integration of the rich text editor SCeditor, and when I have to give the styles I have to enter the path of these, the problem is that I am working with flask, and it does not implement them. I tried the standard way    '../...
asked by 29.10.2018 / 14:59
1
answer

Do not insert data. from the input between django and postgres

catalog / urls.py from django.urls import path from catalogos.views import CategoriaView,CategoriaNew urlpatterns =[ ..... path('categorias/new', CategoriaNew.as_view(),name='categoria_new'), ] views.py class CategoriaNew(g...
asked by 30.10.2018 / 18:17