LUCIT-Systems-and-Development / unicorn-binance-websocket-api

A Python SDK by LUCIT to use the Binance Websocket API`s (com+testnet, com-margin+testnet, com-isolated_margin+testnet, com-futures+testnet, com-coin_futures, us, tr, dex/chain+testnet) in a simple, fast, flexible, robust and fully-featured way.
https://unicorn-binance-websocket-api.docs.lucit.tech/
Other
683 stars 164 forks source link

Import Error - No module named 'unicorn_binance_websocket_api.unicorn_binance_websocket_api_exceptions'; #79

Closed Yahouedeou closed 4 years ago

Yahouedeou commented 4 years ago

Check this or we will delete your issue. (fill in the checkbox with an X like so: [x])

Select one:

Environment

Operating System? (include version)

Python Version Requirement

Exact Python Version?

Include here the response of 'python --version' or 'python3 --version'
Above than Python 3.7

Pip Version?

Include here the response of 'pip --version' or 'pip3 --version'

Dependencies

Run pip list > pip_list.txt and upload the file.

UNICORN Binance WebSocket API Version?

Did you upgrade to the latest release version with `pip install unicorn-binance-websocket-api --upgrade`?

Please control what version you are using with this script and post the output: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/blob/master/tools/get_used_module_version.py

Description of your issue

I have used and without any problems the UNICORN Binance WebSocket module on my local machine, running on MacOs. When I first tried to installed it on a google VM instance, I had an Import Error: 'No module named 'unicorn_binance_websocket_api.unicorn_binance_websocket_api_exceptions';'

The solution for it was simply to rename the file 'unicorn_binance_websocket_api.py' with a different name. The file is located in in env/bin.

Please see attached a screenshot of the log:

Screenshot_2020-05-26_at_17_12_54

Thanks for your great work, Maxime

oliver-zehentleitner commented 4 years ago

Hi Maxime! How did you do the installation? Thanks, Oliver

Yahouedeou commented 4 years ago

I did the installation using pip install, last week.

oliver-zehentleitner commented 4 years ago

there are 3 ways to create a virtual env, which commands did you use?

Yahouedeou commented 4 years ago

To create virtual env I first used "sudo apt install python3-venv" and then "python3 -m venv env".

oliver-zehentleitner commented 4 years ago

I tryed now:

python3 -m venv env
source env/bin/activate
python3 -m pip install unicorn-binance-websocket-api

And a test in the virtual envirement with unicorn lib worked well on linux mint 18 (debian/ubuntu).

Which OS are you using?

Yahouedeou commented 4 years ago

The problem occurred not on my computer (MacOs), but only on my VM machine using their Google Cloud. The image machine is: Canonical, Ubuntu, 18.04 LTS

oliver-zehentleitner commented 4 years ago

So on the Google server must be something different to your mac and my ubuntu. In general it works and to help you I would need a way to reproduce the problem and find the specific reason.

Yahouedeou commented 4 years ago

As I told you I already found the solution Olivier! The solution for it was simply to rename the file 'unicorn_binance_websocket_api.py' with a different name, which is located in env/bin.

I just wanted to let you know about this bug, because maybe other users are facing it.

oliver-zehentleitner commented 4 years ago

Its a workaround and not clean. But you are right, its not blocking you, other users may find help and maybe the time will bring more infos.

Best regards!

oliver-zehentleitner commented 4 years ago

Can you please test the 1.16.6 release and tell me if this issue is fixed?

Thank you!

Yahouedeou commented 4 years ago

I just installed this new release, but I have a new error now. The same as the one reported here: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/issues/98

BinanceWebSocketApiConnection->enter(, ['arr'], ['!userData']) connecting to wss://stream.binance.com:9443/ws/ error: 2 - string indices must be integers

Do you have a solution to fix that first?

oliver-zehentleitner commented 4 years ago

I think that everything is working ok, its only an error message but the code is doing right....

I will change this asap!