Questions tagged as 'python'

1
answer

JSON + Python 'utf8' codec can not decode byte 0xba in position 7:

Dear I want to save information in a json file but it tells me this error: Traceback (most recent call last): File "interbasecom.py", line 271, in <module> classPresupuesto.getPresupuestos() File "interbasecom.py", line 268, in g...
asked by 26.07.2017 / 14:42
1
answer

python - kivy: error: Failed building wheel for kivy

I'm trying to install kivy and I have the following error: My OS is W7 64 bits My version of python is 3.6 (32 bits) What can I do?     
asked by 14.04.2017 / 07:14
1
answer

Do not run the event on Tkinter

I have a problem with Tkinter to execute the movement of the polygon with the arrows of the cursor, it does not generate an error, but it is not executed either. My code is: from tkinter import * tk = Tk() canvas = Canvas(tk, width=400, hei...
asked by 14.04.2017 / 19:22
1
answer

Help with QT designer and PyQt5 with the uic module

I have a problem trying to develop a GUI with PyQt5 and QT desginer. I want to use the uic module, I have a .ui file called registro.ui , and another login.ui , how can I call from login.ui to window registro.ui...
asked by 20.04.2017 / 06:57
1
answer

Generate elements dynamically in a template in Django

{%for i in cont%} <p>{{"module"+i}}</p> {%endfor%} I have this code in my template, and what I want is that it takes for each iteration of the for, a value of a dictionary that comes from the views.py whose keys are module1...
asked by 20.04.2017 / 10:50
1
answer

Error using pythonanywhere

I'm trying to set up a project in www.pythonanywhere.com but when I install the necessary libraries so that it works I get this error and the truth is that I do not understand because if someone has an idea, the help or guidance is greatly appre...
asked by 18.04.2017 / 16:30
2
answers

How to export to PDF in Django?

I'm using Django 1.8 and I want to export an HTML document to PDF, for this I use wkhtmltopdf, in addition to other libraries I had to import the following and the file view.py was like this: from django.views.generic import DetailView from wk...
asked by 04.05.2017 / 21:03
1
answer

Adapt a dataframe to a range of dates

my doubt: I have a df (with Fecha as index and another column Cantidad ) with records every 3rd day from 2016-05-03 until 2016-05-20, example:    df.index [   2016-05-03,   2016-05-05,   2016-05-07 ...] With: df = df....
asked by 05.05.2017 / 18:16
1
answer

Kivy: Simple program does not work for me

I'm trying to pass a full program to Kivy, but I'm not loading it. Then I tried to make the program as simple as possible: from kivy.app import App class TestApp(App): def build(self): print("HelloWorld") TestApp().run() But i...
asked by 14.04.2017 / 22:05
1
answer

Assign the path of a file to a variable and then use it in FFmpeg

I'm trying to make a program in Python and PyQt for video encoding and I have a problem. I do not know how to get a variable with the path of a file and then send it to FFmpeg . I have built a basic window with three buttons, one to c...
asked by 01.05.2017 / 19:01