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
678 stars 166 forks source link

ImportError: cannot import name '_endpoint_from_view_func' from 'flask.helpers' #171

Closed amexcompliance closed 3 years ago

amexcompliance commented 3 years ago

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

Select one:

Environment

What kind of internet connection do you have?

Cable
Include here a description of your internet access like cable, lte and up and download rate.

Whatever COX cable provides the highest bandwidth for residential access

Average system load (CPU)

%55
Include here the ammount of cpu cores and the average system load.

4

Hardware specification

Include here a description of the server hardware.

3.2 GHz 6-Core Intel Core i7 64 GB 2667 MHz DDR4

Operating System? (include version)

Options

Which endpoint do you connect?

Include here the endpint you are connecting to, like binance.com, binance.com-isolated_margin or binance.org-testnet

binance-us

Python Version Requirement

Exact Python Version?

Include here the response of 'python --version' AND 'python3 --version'

(venv3) > $ python --version
Python 3.8.2

(venv3) > $ python3 --version
Python 3.8.2

Pip Version?

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

pip 21.1.1 from /Users/matlihan/venv3/lib/python3.8/site-packages/pip (python 3.8)

Dependencies

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

Package Version


aniso8601 9.0.1 certifi 2020.12.5 chardet 4.0.0 cheroot 8.5.2 click 8.0.0 coach 1.0.0 colorama 0.4.4 Flask 2.0.0 Flask-RESTful 0.3.8 idna 2.10 itsdangerous 2.0.0 jaraco.functools 3.3.0 Jinja2 3.0.0 MarkupSafe 2.0.0 more-itertools 8.7.0 numpy 1.20.1 pathlib 1.0.1 pip 21.1.1 poloniex 0.0.17 poloniexapi 0.5.7 psutil 5.8.0 pytz 2021.1 pyzmq 22.0.3 requests 2.25.1 setuptools 54.1.2 six 1.15.0 ujson 4.0.2 unicorn-binance-websocket-api 1.30.0 unicorn-fy 0.11.0 urllib3 1.26.4 websocket-client 0.58.0 websockets 8.1 Werkzeug 2.0.0

UNICORN Binance WebSocket API Version?

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

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

Attempted to run binance-us example posted here  which results in an import error stated below. 
https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/blob/master/example_binance_us.py

Include the contents of the log file here. (REMOVE API_KEY, API_SECRET, LISTEN_KEY!!)

/Users/matlihan/venv3/bin/python /Users/matlihan/dev/c/tabox/trunk/apps/lua/modules/broker/Binance.py Traceback (most recent call last): File "/Users/matlihan/dev/c/tabox/trunk/apps/lua/modules/broker/Binance.py", line 36, in from unicorn_binance_websocket_api.unicorn_binance_websocket_api_manager import BinanceWebSocketApiManager File "/Users/matlihan/venv3/lib/python3.8/site-packages/unicorn_binance_websocket_api/init.py", line 3, in from unicorn_binance_websocket_api.unicorn_binance_websocket_api_manager import BinanceWebSocketApiManager File "/Users/matlihan/venv3/lib/python3.8/site-packages/unicorn_binance_websocket_api/unicorn_binance_websocket_api_manager.py", line 40, in from .unicorn_binance_websocket_api_restserver import BinanceWebSocketApiRestServer File "/Users/matlihan/venv3/lib/python3.8/site-packages/unicorn_binance_websocket_api/unicorn_binance_websocket_api_restserver.py", line 36, in from flask_restful import Resource File "/Users/matlihan/venv3/lib/python3.8/site-packages/flask_restful/init.py", line 14, in from flask.helpers import _endpoint_from_view_func ImportError: cannot import name '_endpoint_from_view_func' from 'flask.helpers' (/Users/matlihan/venv3/lib/python3.8/site-packages/flask/helpers.py)

Process finished with exit code 1

JourneyToSilius commented 3 years ago

this is also happening here since I rebuilt a container and ran it this morning. looks like a dependency problem ?

Mertalp-Ocal commented 3 years ago

Downgrading flask solved the problem for me: pip install flask==1.1.2

amexcompliance commented 3 years ago

it did solve mine too, thanks.

On Wed, May 12, 2021 at 5:49 PM Mertalp-Ocal @.***> wrote:

Downgrading flask solved the problem for me: pip install flask==1.1.2

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/issues/171#issuecomment-840200984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHOWTSUAD67JC5HD4CVZRULTNMOYFANCNFSM44ZFCEVA .

amexcompliance commented 3 years ago

Per Mertalp Ocal's solution, closing the issue. pip install flask==1.1.2

MarcAroni81 commented 3 years ago

@amexcompliance shouldn't this be fixed in Master?

amexcompliance commented 3 years ago

Probably. Yet I leave that decision to Oliver as this is really not a code bug.

On Thu, May 13, 2021 at 12:52 PM MarcAroni81 @.***> wrote:

@amexcompliance https://github.com/amexcompliance shouldn't this be fixed in Master?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/issues/171#issuecomment-840794604, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHOWTSSOTJREYUFQZBGMIODTNQUZTANCNFSM44ZFCEVA .

oliver-zehentleitner commented 3 years ago

Thanks for reporting this issue! Not sure how to fix it (bind to old flask or modify ubwa to work with latest flask), but it will be solved with the next release.

oliver-zehentleitner commented 3 years ago

It seems to be solved in upstream: https://github.com/flask-restful/flask-restful/pull/913

Does everything work again as it should?