Questions tagged as 'python-3.x'

1
answer

Python: 'numpy.int32' object is not iterable

I'm constantly having this error and I do not know how to fix it. This is the code: import numpy as np import itertools import random g_row=10 g_col=10 m_prob = np.ones((g_row, g_col), dtype=np.int) s_acomulada = list(itertools.accumulat...
asked by 26.05.2018 / 02:26
1
answer

Fill rows with missing dates in DataFrame

I am working with some data from a meteorological station in which the data is distributed by columns in day with 24 hours, predominant direction, wind direction in degrees The problem is that there are days, even full months, that do not com...
asked by 16.04.2018 / 21:25
2
answers

Python 3 handling error TypeError: catching classes that do not inherit from BaseException is not allowed

When I run this code: i=0 while i<5: i=i+1; try: SellSta=client.get_order(symbol=Symb,orderId=SellOrderNum,recvWindow=Delay) except client.get_order as e: print ("This is an error message!{}".format(i)) #End whil...
asked by 24.11.2018 / 04:35
1
answer

Disable chrome window in selenium python

I need to deactivate the browser window that opens when the tests are run. I copy the code I use and it should work but it does not: from selenium.webdriver.chrome.options import Options class LoginTest(unittest.TestCase): def test(self):...
asked by 20.02.2018 / 21:41
1
answer

keypressevent does not detect the enter key pyqt

A simple question I am trying to detect the enter key of my keyboard by pressing it but it does not work. this is the code I use: import sys from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5 import QtCore from PyQt5 import Qt...
asked by 21.03.2018 / 01:51
1
answer

Doubt with .show () from matplotlib

Working with matplotlib to generate graphs, I do not quite understand the difference between these two ways of generating and displaying a graph. I have read documentation about it, but it has not been clear to me. Form 1: import matplotlib...
asked by 10.01.2018 / 14:11
3
answers

Increase days to a given date with nested arrangement

I am a beginner in Python and I am trying to make a program that reads a date ( AAAA-MM-DD ) given by the user and allows me to show 5 days subsequent to the given date and to make the changes of day, month or year in his case Any ideas? I...
asked by 10.01.2018 / 19:52
1
answer

Pandas convert non-null objects

After importing using urlib , Internet data, I can create a DataFrame (df) with two columns (Fecha y Valor) of the types: Fecha 1563 non-null object, Valor 1563 non-null object. With the statement df["Fecha"] =...
asked by 15.01.2018 / 13:02
1
answer

Problem executing an .exe with pyinstaller

Bunas, I tell you my problem, when working with the package anaconda3-4.2.0 x86 for windows 10 x64 I could generate my .exe program and it worked correctly. Then I had to format my PC for some problems and install the same version of widows 10...
asked by 12.12.2017 / 20:13
1
answer

How can I activate an object in Blender with Python

From a Python script I want to activate an object in order to enter editing mode and edit it. To select the desired object I use bpy.context.scene.objects["Nombre_objeto"].select = True # (1) What happens is that if before selecting the ob...
asked by 30.04.2018 / 18:55