-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecation error on lightreamer.Subscription #321
Comments
I had this, or very similar, when I updated trading-ig from 0.0.20 to 0.0.21. I took the opportunity to rework the code rather than resolve or work around the issue - version 0.0.21 added lightstreamer auto-reconnects which is a very useful thing to me. To help with diagnosis, you could try installing the specific version 0.0.20 and see is that get's things working again:- If and when you upgrade trading-ig to 0.0.21 (or higher), please remember to stick to version 1.0.3 of the lightstreamer library (compatible with Lightstreamer Server 7.3.3), as version 2.0.0 requires Lightstreamer Server 7.4.0 (not yet deployed by IG). |
So, you could try changing your
because of this changes, the PS: the change from trading_ig.lightstreamer to official lightstreamer happen at |
Getting a deprecation warning on my code that was previously working fine.
Error:
/app/app.py:2127: DeprecationWarning: trading_ig.lightstreamer.Subscription is deprecated, and will be removed in a future version; use the official Lightstreamer Python client instead [server] subscription_prices = Subscription( [server] Traceback (most recent call last): [server] File "/app/app.py", line 2134, in <module> [server] sub_key_prices = ig_stream_service.ls_client.subscribe(subscription_prices) [server] File "/usr/local/lib/python3.9/site-packages/lightstreamer/client/ls_python_client_wrapper.py", line 1138, in subscribe [server] self.delegate.subscribe(subscription.delegate) [server] AttributeError: 'Subscription' object has no attribute 'delegate'
Code around them lines:
I have tried removing the line
sub_key_prices = ig_stream_service.ls_client.subscribe(subscription_prices)
However still getting the below error.
Error:
/app/app.py:2127: DeprecationWarning: trading_ig.lightstreamer.Subscription is deprecated, and will be removed in a future version; use the official Lightstreamer Python client instead [server] subscription_prices = Subscription(
Everything was working fine before i restarted my Docker Desktop and it had to rebuild the container, so not sure if this is because the library has been updated.
Thanks for any help
The text was updated successfully, but these errors were encountered: