Questions tagged as 'python'

0
answers

FileNotFoundError: File b'tek0000ALL.csv 'does not exist

I'm trying to get a .csv file and it gives me the following error:    FileNotFoundError: File b'tek0000ALL.csv 'does not exist The file is in the same department as the program and the name is well copied. The code is as follows: import...
asked by 04.07.2018 / 09:25
0
answers

How can I create a PDF horizontally?

How can I create a PDF horizontally? '''Se genera el archivo PDF''' '''Le indicamos que tiene que descargar el archivo en el navegador''' response = HttpResponse(content_type='application/pdf') '''Indicamos el nombre del archivo''' response['...
asked by 04.07.2018 / 14:44
0
answers

TypeError: missing dsn and no parameters when I change my database

I'm trying to change a simple chat application to a more complex one by following this tutorial . Now I am deciphering how to change my database. The teacher chose Flask-SQLAlchemy and SQLite but I've already started with PostgreSQL. So I try...
asked by 06.07.2018 / 11:40
0
answers

Enable daemon so that it always runs

I have the following script in Bash that executes a script in Python. At the moment I only have the options of "start", "restart" and "stop": #!/bin/bash # /etc/init.d/test ### BEGIN INIT INFO ... ### END INIT INFO c...
asked by 02.07.2018 / 17:54
0
answers

ImportError at / No module named 'django.urls'

I'm totally new to this in Python in web pages, I consulted and well, I decided to use Django as a framework, I followed a tutorial and I have come to the part of uploading it to the web, the page is called pythonanywhere , then when I try to v...
asked by 01.07.2018 / 23:01
1
answer

Problem when defining a backend.py django

I am extending the functionality of Django users and have created my own backend as follows: backends.py from home.models import Usuario class UserAuthentificacionBackend(object): def authenticate(self, username=None, password=None):...
asked by 01.07.2018 / 09:50
0
answers

Problem with conditional in python

I am developing a code in python to present the table of the Brazilian championship and the first and second place. However, I am not doing the conditional in the correct way for the second placed. Can someone help me? m = [] #Entrada do núme...
asked by 30.06.2018 / 18:21
0
answers

how can I edit the source code of the odoo point of sale module 11

Hi, I would like to know how I can edit the pos module, add buttons for wholesale products set for example button quantity = 12, another amount = 50 and that a discount is applied that is not pre-configured, example amount = 12 give a discount o...
asked by 28.06.2018 / 21:00
0
answers

How to save model in ML Engine to train?

I am trying to upload a model to ML Engine to train it once it is deployed here, what I want is to be able to train it and then do perditions, all from ML Engine. I am using Python as a language, I have already managed to create my model with...
asked by 29.06.2018 / 08:22
0
answers

Can a custom property be added to a file?

Is it possible to write a custom property to a file from Python? I need to add some extra attributes such as version, description, etc.     
asked by 02.07.2018 / 18:26