Questions tagged as 'python-3.x'

1
answer

TypeError: unsupported operand type (s) for /: 'dict_values' and 'int'

Every time I run this code in python I get the error:    TypeError: unsupported operand type (s) for /: 'dict_values' and 'int' . How could I solve it? def analizar(): dic = {} fClasses = open(nomFileClasses,'r') lna = fCla...
asked by 19.03.2017 / 21:02
1
answer

Modify the value of a variable

I'm wanting to make a game of Stone, Paper or Scissors in Python, nothing complicated. The player starts with 2 points and depending on whether he wins or loses adds or subtracts value. The problem is that it is not saved in the variable that I...
asked by 27.10.2016 / 02:25
1
answer

Using WSGI with python 3.5

Good afternoon I need help to get an application running with django 1.8 and python 3.5 on an ubuntu server (Edit :) They are installed libapache2-mod-wsgi-py3 and enabled the a2enmod wsgi The code is located at: /var/www/html/ri...
asked by 16.01.2017 / 21:13
1
answer

How can you avoid generating line breaks while using print in python3.4?

I have the following function def reproducir(texto): pygame.mixer.music.load(TECLADO) for letra in str(texto): pygame.mixer.music.play() print(letra, end="") time.sleep(0.05) sys.stdout.flush() pygame.m...
asked by 04.10.2016 / 20:16
2
answers

Windows without borders in pyqt5

I managed to remove the borders from my main window but now I can not move it with the mouse. This is what I used for it: self.setWindowFlags((Qt.FramelessWindowHint)) How can I move it again without the edges?     
asked by 12.08.2016 / 07:52
1
answer

Permission denied when extracting document in zip

I'm trying to extract some documents from a zip and I have the following error. The folder has all the permissions if I do manual the extraction works.    PermissionError: [Errno 13] Permission denied:   'D: \ requestsOSM \ downloadPOI' T...
asked by 19.12.2018 / 19:15
0
answers

NameError: name '__callback' is not defined

I am trying to use gupnp (GNU library for UPnP and DLNA operations), using GObjectIntrospection: import functools import gi gi.require_version( 'GSSDP', '1.0' ) from gi.repository import GSSDP from gi.repository import Gtk __callback =...
asked by 12.12.2018 / 20:53
1
answer

what error are you referring to when creating a local directory in Python?

I create a function to download an FTP Server directory and try to create it before in local and I miss an error def Down_Dir(ftp, dir): ftp.cwd('\datos') try: os.makedirs(os.getcwd()+"\"+dir) except OSError as e:...
asked by 05.12.2018 / 12:30
0
answers

Time series

A company manages GPS data for a fleet of buses, and has the following table. Table: ['fecha', 'latitud', 'longitud', 'altitud', 'velocidad', 'cog', 'nsat', 'tipo', 'utc_hora', 'fix_fecha', 'imei', 'registro', 'input1', 'input2',...
asked by 24.12.2018 / 14:31
0
answers

How to transform an MLP neural network into an RNN?

I have an MLP rating to predict the prices of the stock market prediction [0:] and the sentiment score on the 'sentiment_score' items. Now I want to try an RNN to do the same. However, I cook during the adjustment. The MLP classifier was: f...
asked by 22.12.2018 / 12:58