Questions tagged as 'python'

0
answers

How to show an alert in python? [closed]

I want to validate a date range and if it's wrong, show an alert to the user, but I do not know how to do it, I'm working on the filter.py what I have is the following: if fecha2 <= fecha1: print "fecha incorrecta"...
asked by 08.06.2016 / 23:45
0
answers

Use the python xlrd module [closed]

I installed the xlrd module on my computer and I can not use it. When importing xlrd I get the following: Traceback (most recent call last): File "<pyshell#11>", line 1, in <module> import xlrd File "C:\Python27\xlrd.py", l...
asked by 16.06.2016 / 03:33
0
answers

NOT NULL constraint failed: Adm_profile.user_id in django Allauth [closed]

I have a problem which I have been looking for a solution for a while and I have not been able to find it, since the error that I get, can be solved by putting it in the field of "OneToOneField (null = True), but when doing that my system loses...
asked by 23.09.2016 / 06:27
1
answer

How can I integrate Pygame and PyQt4?

I'm using Python 2.7 and Ubuntu 14.04. I find myself trying to this to insert my pygame window into my PyQt4 window.    On some platforms it is possible to embed the pygame display in an existing window. To do this, the environment vari...
asked by 09.07.2016 / 20:07
1
answer

TypeError: the JSON object must be str, not 'bytes'

People have a problem with this code: def task_get_data_misindicadores(): url = 'https://*****.co/api/*****/{0}/'.format( config.MI_APIKEY ) req = requests.get(url) if not req.ok: return 'Timeout Error' to_...
asked by 27.05.2016 / 17:08
0
answers

Convert an audio stream to a wav file

def getStream(frec, duration): NF = int(BITRATE* duration) RF = NF % BITRATE WD = '' for x in range(NF): WD = WD+chr(int(math.sin(x/(BITRATE/frec)/math.pi))*127+128)) for x in range(RF): WD = WD+chr(128)...
asked by 01.06.2016 / 04:21
2
answers

Codenerix - Disable a dropdown field to a foreign key using ng-readonly

Codenerix Does anyone know how to correctly use ng-readonly in a GenModelForm when calling from a sublist tab (GenList) which in turn invokes a CreateModal window? The structure is master-detail. The sublist has the pk of the master table...
asked by 23.11.2017 / 00:58
1
answer

How to import a csv file in Cassandra?

Good afternoon, I try to import a csv file in Cassandra that is very long. It is dealing with food products: ingredients, nutrition, labels. It comes from Open Food Facts. It lists information about food products: ingredients, nutritional inform...
asked by 22.11.2017 / 15:02
1
answer

PyQt4 error not modulo?

I have a problem. I want to work with PyQt4, but when I import it I get an error: from PyQt4 import QtGui Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> from PyQt4 import QtGui ImportError: No modul...
asked by 10.05.2016 / 17:33
0
answers

Problem with latex in Python function Sympy how do I solve it? [closed]

A couple of weeks ago I started using Python. The problem is that with the SymPy library, using the use_latex parameter, the text does not appear in latex. Before it worked and I do not know what happened, I just tried to print on the Python con...
asked by 25.04.2016 / 03:33