LUCIT-Systems-and-Development / unicorn-binance-suite

LUCIT's UNICORN Binance Suite is a comprehensive collection of open-source Python packages designed for building sophisticated automated trading systems. Tailored for Python developers, this suite offers seamless integration with the Binance API, enabling the creation of advanced and professional trading bots for streamlined and efficient trading.
https://unicorn-binance-suite.docs.lucit.tech
Other
47 stars 8 forks source link

File "lucit_licensing_python/manager.py", line 136, in lucit_licensing_python.manager.LucitLicensingManager.__init__ lucit_licensing_python.exceptions.NoValidatedLucitLicense: The license is invalid! #14

Closed aengusrooneygrafana closed 7 months ago

aengusrooneygrafana commented 7 months ago

Solution to Issue cannot be found in the documentation or other Issues and also occurs in the latest version of this library.

Issue

Hello! I'm following this article https://medium.lucit.tech/passing-binance-market-data-to-apache-kafka-in-python-with-aiokafka-570541574655 Running on a MacOS (Sonoma-latest) with Python 3.9.12 and PIP latest.
I have installed $ python3 -m pip install aiokafka --upgrade $ python3 -m pip install unicorn-binance-websocket-api --upgrade

When I try to pyhton3 this script https://gist.githubusercontent.com/oliver-zehentleitner/92b632f582df22523b1d5593faa0a4f4/raw/cdd6d27a1efcb2a5bca3985f9337286ce457d3e3/ubwa_apache_kafka.py

I get an error File "lucit_licensing_python/manager.py", line 136, in lucit_licensing_python.manager.LucitLicensingManager.init lucit_licensing_python.exceptions.NoValidatedLucitLicense: The license is invalid!

I have followed this article (I've downloaded two licenses, one with my email, one with my wife's email, to make sure it was not a license issue):
https://medium.lucit.tech/how-to-obtain-and-use-a-unicorn-binance-suite-license-key-and-run-the-ubs-module-according-to-best-87b0088124a8

lucitlicmgr --info {'license': {'license_holder_email': 'chikaandgus@gmail.com', 'license_holder_name': 'Chika Andgusta', 'licensed_product': 'UNICORN-BINANCE-SUITE', 'paid_till': '2023-12-10 15:04:39.488397+00:00'}, 'signature': '', 'timestamp': '1701623456.1413603'}

I am getting the error


Traceback (most recent call last):
  File "/Users/aengusrooney/github/aengusrooneygrafana/crypto-visualisation/binance-unicorn-suite.py", line 67, in <module>
    ubwa = BinanceWebSocketApiManager(exchange=exchange,
  File "unicorn_binance_websocket_api/manager.py", line 256, in unicorn_binance_websocket_api.manager.BinanceWebSocketApiManager.__init__
  File "lucit_licensing_python/manager.py", line 136, in lucit_licensing_python.manager.LucitLicensingManager.__init__
lucit_licensing_python.exceptions.NoValidatedLucitLicense: The license is invalid! Please get a valid license from the LUCIT Online Shop: https://shop.lucit.services/software/unicorn-binance-suite```

and log file: 

```cat binance-unicorn-suite.py.log
2023-12-03 18:03:56,831 [INFO    ] 93840 140704627383104 binance-unicorn-suite: New instance of unicorn-binance-websocket-api_2.1.2-python_3.9.12-compiled on Darwin 23.1.0 for exchange binance.com started ...
2023-12-03 18:03:56,832 [INFO    ] 93840 140704627383104 binance-unicorn-suite: Debug is False
2023-12-03 18:03:56,832 [DEBUG   ] 93840 140704627383104 binance-unicorn-suite: Loading LUCIT license from parameters.
2023-12-03 18:03:56,832 [INFO    ] 93840 140704627383104 binance-unicorn-suite: New instance of lucit-licensing-python_1.8.1-python_3.9.12-compiled on Darwin 23.1.0 started ...
2023-12-03 18:03:56,882 [DEBUG   ] 93840 123145475018752 connectionpool: Starting new HTTPS connection (1): private.api.lucit.services:443
2023-12-03 18:03:57,024 [DEBUG   ] 93840 123145475018752 connectionpool: https://private.api.lucit.services:443 "GET /licensing/v1/verify?license_token=5f4e9c1f-26cd-4016-910f-t70c91087fac3&id=eeb69133-8661-46d2-a611-1a06a806828d&mac=0xacde48001122&os=Darwin&program_used=unicorn-binance-websocket-api&python_version=3.9.12&timestamp=1701623036.8325162&signature=aadecbbd4996359ac5fecc3802cf76b3ab92e8b1b484c652523a6c01b045b103 HTTP/1.1" 500 21
2023-12-03 18:03:57,027 [CRITICAL] 93840 123145475018752 threading: Connection Error - Connection could not be established.
2023-12-03 18:03:57,031 [DEBUG   ] 93840 123145475018752 connectionpool: Starting new HTTPS connection (1): private.api.lucit.services:443
2023-12-03 18:03:57,178 [DEBUG   ] 93840 123145475018752 connectionpool: https://private.api.lucit.services:443 "GET /licensing/v1/verify?license_token=<token>3&id=<id>&mac=0xacde48001122&os=Darwin&program_used=unicorn-binance-websocket-api&python_version=3.9.12&timestamp=1701623037.027499&signature=<signature> HTTP/1.1" 403 52
2023-12-03 18:03:57,180 [CRITICAL] 93840 123145475018752 threading: 403 Forbidden - Insufficient access rights.
2023-12-03 18:03:57,181 [CRITICAL] 93840 123145475018752 threading: The license is invalid! Please get a valid license from the LUCIT Online Shop: https://shop.lucit.services/software/unicorn-binance-suite
2023-12-03 18:03:57,181 [INFO    ] 93840 123145475018752 threading: BinanceWebSocketApiManager.stop_manager() - Stopping unicorn_binance_websocket_api_manager 2.1.2 ...
2023-12-03 18:03:57,181 [DEBUG   ] 93840 123145475018752 threading: BinanceWebSocketApiManager.stop_manager() - AttributeError: 'BinanceWebSocketApiManager' object has no attribute 'stream_list'
2023-12-03 18:03:57,181 [DEBUG   ] 93840 123145475018752 threading: stop_manager() - AttributeError: 'BinanceWebSocketApiManager' object has no attribute 'restclient'
ajrmbp20-3:crypto-visualisation aengusrooney$ python3 --version
Python 3.9.12
ajrmbp20-3:crypto-visualisation aengusrooney$ lucitlicmgr --info
{'license': {'license_holder_email': 'chikaandgus@gmail.com',
             'license_holder_name': 'Chika Andgusta',
             'licensed_product': 'UNICORN-BINANCE-SUITE',
             'paid_till': '2023-12-10 15:04:39.488397+00:00'},
 'signature': 'f7969fd98c9c8784a491ed2d4927b8b0c2dd80243653c0deb6293c812c376464',
 'timestamp': '1701623456.1413603'}```

Any help would be greatly appreciated!  
Thank you.  
aengusrooneygrafana commented 7 months ago

(Sorry - I meant to open this in https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/issues - can the issue be transferred?)

aengusrooneygrafana commented 7 months ago

Closing - no longer required thanks!

oliver-zehentleitner commented 7 months ago

that is strange, the license obviously works but is not available in the python script.

Where do you store the license? Is the python script running with the same user you are calling lucitlicmgr with?

You can also chat with me and I will help you through: https://www.lucit.tech/get-support.html