Questions tagged as 'python-3.x'

2
answers

Use filter in Django

I have my function buscar , but I get this error: Here is the code: view.py class ListarTipoAlmacen(ListView): model = Tipo_almacen template_name = 'tipo_almacen/lista_tipo_almacen.html' paginate_by = 10 def...
asked by 23.03.2016 / 20:49
1
answer

Error trying to calculate element with the highest value of an array

I have a problem with the following function: def conjunmas(): for (conjunto) in (arreglo): totalm = 0 cma = 0 for (unidad) in (arreglo): totalm = (totalm + unidad) if (totalm > cm...
asked by 10.05.2016 / 02:49
0
answers

TabError: inconsistent use of tabs and spaces in indentation. Python3

Well, I have a problem, I get this error: File "sss.py", line 24 if order not in self.products_exhausted: ^ IndentationError: unindent does not match any outer indentation level I have tried every...
asked by 01.01.2019 / 00:20
1
answer

How to inherit the multiple inheritance constructor from a secondary super-class in python3?

How to inherit the multiple inheritance constructor from a secondary super-class in python3? Greetings I have a question, how can I make the sub-class: "MyClass" inherit the constructor of the super-class "MySuperClase2" in multiple inheritan...
asked by 03.01.2019 / 20:10
0
answers

I do not see the sprite of the parent class

Having this daughter class: import galapagoo import random import drawlib class Radio_Galapago(galapagoo.Galapago): def __init__(self): drawlib.start_render() self.sprite=drawlib.make_sprite("/home/Documentos/Proyecto2/mic...
asked by 31.12.2018 / 13:22
0
answers

PyQt5 - start program

I have two separate script, on the one hand I have the program created in python3 which is called count.py and on the other hand I have created the GUI in PyQt5 called interface.py with the functionalities that I need. My question is this...
asked by 28.12.2018 / 10:42
2
answers

Python - Django error when creating super user

I am creating a student management service. Once I finish designing the models I make the migrations (makemigrations and migrate) of my apps, without problems. But when trying to create a super user, this error occurs: Nombre de usuario: Admin...
asked by 24.12.2018 / 18:43
0
answers

AttributeError: '_SubParsersAction' object has no attribute 'add_mutually_exclusive_group'

I have a code that I am using argparse and I want to use add_mutually_exclusive_group in 2 subparsers because I want one of the 2 to be required, and I get this error: AttributeError: '_SubParsersAction' object has no attribute 'add_mut...
asked by 22.12.2018 / 21:50
0
answers

Creepy error from PyQt4.QtWebKit import QWebPage, QWebSettings ImportError: No module named QtWebKit

When running sudo python CreepyMain.py I get the following error:    Traceback (most recent call last): File "CreepyMain.py", line 20, in          from PyQt4.QtWebKit import QWebPage, QWebSettings ImportError: No module named QtWebKit...
asked by 09.12.2018 / 04:01
0
answers

try + except or if + else?

I am writing some functions in python3 to work with some GPS data received by UART. Those data I have to cast them and leave them ready to later work with them. However, I am faced with the question of how to do it, because at first I had tri...
asked by 12.12.2018 / 20:08