dominiktraxl / pykrakenapi

A python implementation of the Kraken API.
GNU Lesser General Public License v3.0
225 stars 53 forks source link

Weird issue, no attribute 'factor' #38

Closed ghost closed 4 years ago

ghost commented 4 years ago

It's not linked to this package, as the same working is not throwing any error on different oses. But I'm searching where I can in case someone has an idea.

When testing my code on Archlinux, I got AttributeError: 'KrakenAPI' object has no attribute 'factor'. It's impossible, as I tested the same code on three other oses (Manjaro, which is Arch based, Windows 7 and Windows 10) AND I reviewed the code and self.factor is initialized in the same class as the function where it's used.

In addition, the function throwing the error (get_recent_trades()) was used in an ancient version of the code and worked flawlessly on Arch.

So it seems I made a modification on Arch that broke something (I don't know what as the error makes no sense at all)

Also, the code is REALLY slow on Arch.

I'll update this issue as soon as I find something.

EDIT : I tried running my code on the LTS kernel, same issue. It's not coming from Arch, I'm pretty sure. It surely comes from a modification I made but I can't imagine what could cause something that weird.

EDIT : I did solve my problem by creating a virtual environment on the USB stick that carries my stick.

The venv and the packages installed in it works as they should on Manjaro and on Arch.

It appears my python installation was messed up (and for good reason, I installed packages with pip (probably sudoed pip) globally and it surely collided with the packages installed by Arch).

So the solution is either making a clean install of python and the packages or making a virtual environment with only the packages you want (I suggest option 2).