Skip to content

Tag: spyder

Cannot unpack non-iterable int object

I need to use __getitem__ for all 7 arguments in my class but __getitem__ won’t let me so I tried to use a tuple but I keep getting this error: What should I do? Answer To make a getitem that returns the contents of each of the member variables given a key that is the same as the name of

Stop showing plots in spyder

I have scripts that make lots of plots. I save them directly with plt.savefig() rather than plt.show() so I don’t have to close all the windows. In spyder, they all show up in the console if I use inline (meaning I have to scroll way back to see other output), and they all show up in separate windows if…

AttributeError when reading a pickle file

I get the following error when I’m reading my .pkl files on spyder (python 3.6.5): The context: My program is made of one file: program.py In the program, a class Signal is defined as well as many functions. A simplified overview of the program is provided below: The function compute_data will return a …