Questions tagged as 'python-3.x'

0
answers

How to know if a client has stopped sending me a message type

I'm creating an online minigame. The server (UDP) is doing it with python. I wonder if there is any way to know from the server if one of the connected clients has stopped sending X message. I need it to manage the disconnections. That's why...
asked by 06.01.2018 / 20:42
0
answers

ModuleNotFoundError: No module named 'pandas_datareader'

In Windows10, I have Anaconda3 5.0.1 installed. This package does not seem to include pandas-datareader . I have verified, running the same script in Linux with the same version of Anaconda3 and installing this package, that the script works co...
asked by 07.01.2018 / 18:29
1
answer

Python: AttributeError: can not set attribute. I can not create my instance

I have an error creating my instance #! python3 class Profile(object): """contiene la informacion del perfil""" def __init__(self): self.name = None @property def name(self): """name""" return self...
asked by 31.12.2017 / 23:37
3
answers

Exercising nested loops in 3x python

I have been practicing with some simple Python 3x exercises that I got on the web, they are about nested for loops that draw geometric figures, however, there is one that I can not solve for more attempts I have made. The exercise goes like this...
asked by 29.12.2017 / 08:04
3
answers

do a json of two directories in python

I hope you can help me, I have two directories that I want to join and make a json but I'm not staying. I put down what I am using. import json uno = { 'NoSol': '1192017', 'idDocumento': '4fd174c8-3439-4c80-9b1c-1c3e6721f827', 'St...
asked by 04.01.2018 / 19:56
0
answers

Problems with foreign key when entering new records

Help please, I am trying to enter data to a table Empleadnom with 2 foreign keys of two other tables, the creation has no problems, with this code: eng = create_engine("mysql+mysqldb://root:000@localhost:000/bdnomprueba2", echo=True) Bas...
asked by 12.01.2018 / 17:57
1
answer

Problem with reading files in python

I have some doubts regarding the issue of working with files in python since I am starting on this topic. Is that I have to make a program that reads lines of numbers separated by ":" from a file .txt in this case of comuni...
asked by 18.12.2017 / 18:49
1
answer

Get file path from the request.POST in Django

I want to obtain the path of a file that I upload using a form but when printing the field returns a type None . My models.py is this class Insumo(models.Model): nombre = models.CharField(max_length=50) file = models.FileField...
asked by 13.12.2017 / 15:42
1
answer

Error modifying elements in sublists, all end with the same content

Someone could tell me why I have an error in the following code: tabla=[] linea=['0'] for k in range (3): linea.append('') for k in range(12): tabla.append(linea) i=0 for k in ['1','2','3','4','5','6','E','F','P','G','2G','T']: tab...
asked by 27.09.2017 / 17:26
1
answer

Error: TypeError: can not multiply sequence by non-int of type 'str'

What is the following error?:    TypeError: can not multiply sequence by non-int of type 'str' This is my code: import math print("teoria de inventarios") print("elige el modelo") print("1.-modelo deterministico") print("2.-modelo con...
asked by 07.12.2017 / 02:21