sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.98k stars 2.2k forks source link

__init__.py is empty??? import error "Client, ThreadedWebsocketManager, ThreadedDepthCacheManager" etc. #1187

Open Seisix opened 2 years ago

Seisix commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

I am using python-binance on docker Anaconda environment. and When I did updating this module, import didn't work. I tried re-build images etc, but never success. I checked init.py where is in my container (opt/conda/lib/python3.9/site-packages/binance/) And I found init.py is totally blanc. I dont know why.
Please check it.

To Reproduce Code snippet to reproduce the behavior:

from binance.client import Client from binance import AsyncClient, DepthCacheManager, BinanceSocketManager

ImportError Traceback (most recent call last) /tmp/ipykernel_99/3827176939.py in 1 from binance.client import Client # """ ----> not error. but without ".client" as example went out error.""" ----> 2 from binance import AsyncClient, DepthCacheManager, BinanceSocketManager

ImportError: cannot import name 'AsyncClient' from 'binance' (/opt/conda/lib/python3.9/site-packages/binance/init.py)

Expected behavior A clear and concise description of what you expected to happen.

Environment (please complete the following information):

Logs or Additional context Add any other context about the problem here.