Questions tagged as 'python'

1
answer

Update lists within dictionaries

After asking for the votes of the pets, how did I update the new information in the voting list? mascotas={'Puka':[0,0,0],'Morita':[0,0,0],'Martin':[0,0,0],'Napo':[0,0,0]} redesSociales=['Facebook','Instagram','Twitter'] votos = list(mascotas...
asked by 03.01.2019 / 04:14
0
answers

Scrollbar does not work in Canvas - Python

I have a problem with a job that I have to do, the question is that I have to open an image and put it on the canvas and if the image is bigger than the canvas I want to be able to move with the scrollbars, the question is that the scrollbars re...
asked by 22.12.2018 / 21:00
0
answers

Problem running Python program in MatLab "Undefined variable" and "or class" py.our_module.our_script.our_function "."

I have MatLab 2017b. I followed the example of the following video to the letter: link I even downloaded without altering the code provided by the author of the video in the description: link import numpy def our_function(text):...
asked by 18.12.2018 / 20:18
0
answers

Problem with special characters in request get with django, nginx as reversed proxy & gunicorn

I have a Django application that shows a list of documents of different extensions, the name of the documents contain special characters such as accents, ñ, etc. When I show the list I put a link that points to the location of the document in th...
asked by 19.12.2018 / 23:01
0
answers

Pass Context to XML Django

I'm trying to pass a context (variables, parameters) to an xml template that has the following structure: <infoTributaria> <ambiente>1</ambiente> <tipoEmision>1</tipoEmision> <razonSocia...
asked by 19.12.2018 / 21:17
0
answers

Error "variable local referenced before assignment"

I have two apparently equivalent variables. One works well, the other gives me the famous error:    local variable referenced before assignment Partial code: from kivy.app import App from kivy.uix.relativelayout import RelativeLayout g...
asked by 17.12.2018 / 16:50
0
answers

How can I solve this error?

I'm doing a program to control TVs remotely, but I get this error. Error: Juans-MacBook-Pro:libLGTV_serial-master juanpablo$ python LGTV.py --togglepower Traceback (most recent call last): File "LGTV.py", line 5, in <module> f...
asked by 17.12.2018 / 16:42
0
answers

Response without ModelSerializer in Django?

I need to send the list "search" by response, the problem is that I can not serialize it with the library "JSON" that brings django by default and send it by the URL to the Frontend, how can I serialize the list and send it as any object json to...
asked by 21.12.2018 / 17:26
1
answer

How to work with datetime

My problem is that I do not know how I can do to work with datetime but faster, when I do for it takes almost 1 day to run df2 = pd.DataFrame({'fecha1': ["2018-3-3","2018-4-15"], 'fecha2':["2018-02-31","2018-...
asked by 04.01.2019 / 02:12
0
answers

VSC does not show the contents of pickle files in binary

I have been learning about file management: import pickle from io import open class Pelicula: # Constructor de clase def __init__(self, titulo, duracion, lanzamiento): self.titulo = titulo self.duracion = duracion...
asked by 13.12.2018 / 13:27