Questions tagged as 'python'

0
answers

How can I use the variable (local) that is inside a class outside the class (global)?

I am new to the world of programming. You can help me understand how I can use an instance variable globally. In this case I would like to use the variables self.x and self.y outside the class. Thanks !!! import tkinter as tk import wi...
asked by 08.05.2018 / 21:39
0
answers

Click on hidden menu gives unknown error

I'm scraping the web nowgoal.com. If you go to any game that appears on the main page, for example link you have several tables. Each table has on the right a series of options to the right of the Away column. When I try to select an option fr...
asked by 26.04.2018 / 20:19
1
answer

Why do I get this error with reverze_lazy?

I have the following code of my function to create a form def correspondencia_view(request): if request.method == 'POST': form = CorrespondenciaForm(request.POST) if form.is_valid(): # si es todo correcto el archiv...
asked by 11.05.2018 / 17:06
1
answer

Doubt with decorators in Python

I have a question with the application of decorators. I understand that a decorator is a function that receives another function as a parameter and "wraps" it. But if this function has to return a value ( return ) it returns it as None...
asked by 24.04.2018 / 22:55
1
answer

how can I fix this error when installing builtdozer

The command. pip install --upgrade buildozer The error that returns to me is always the same.    root @ android-HP-ProBook-6550b: / home / android # pip install buildozer   Traceback (most recent call last): File "/ usr / bin / pip", lin...
asked by 25.04.2018 / 16:39
3
answers

Modifying or updating a post does not return an HTTPResponse object

Starting in Django I ran into a problem that I can not solve. The application is a blog. of the DjangoGirl tutorial. The invaluable help is appreciated. When I want to add a post from a form or I want to update a post I get the followin...
asked by 21.04.2018 / 21:39
4
answers

Do not upload the image in a django form

I have a form to upload locations, if I remove the image field of the models.py it is uploaded if not no! Would they know where they could have the error? My models. py: class Ubicacion(models.Model): nombre = models.CharField(max_length=...
asked by 13.04.2018 / 11:35
2
answers

I'm starting with python and I do not understand one thing. Help

I am following a course for beginners. In the following example I do not understand the use of x% in the line    t.pencolor (colors [x% len (family)]) # Rotate through the colors If someone can explain it to me, I would appreciate it....
asked by 05.04.2018 / 16:47
0
answers

How to write a date in Python and verify it? [closed]

Sorry for the repeated questions but I just started to program! :) How do I put a date in Python? And then how can I verify it?     
asked by 06.04.2018 / 02:17
1
answer

ValueError: dictionary update sequence element # 0 has length 1; 2 is required

I'm trying to make a web program, but the moment I want to throw the message I get the following error: ValueError: dictionary update sequence element # 0 has length 1; 2 is required My code is as follows: from jinja2 import Environment,...
asked by 06.04.2018 / 17:05