Skip to content
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

Error on object has no attribute 'endpoint' #7

Closed
windhamwong opened this issue Apr 5, 2022 · 0 comments
Closed

Error on object has no attribute 'endpoint' #7

windhamwong opened this issue Apr 5, 2022 · 0 comments

Comments

@windhamwong
Copy link

windhamwong commented Apr 5, 2022

self._connect(self.endpoint)

Error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/websocket/_app.py", line 424, in _callback
    callback(self, *args)
  File "/usr/local/lib/python3.10/site-packages/pybit/_websocket_stream.py", line 84, in <lambda>
    on_error=lambda ws, err: self._on_error(err)
  File "/usr/local/lib/python3.10/site-packages/pybit/_websocket_stream.py", line 147, in _on_error
    self._connect(self.endpoint)
AttributeError: '_FuturesWebSocketManager' object has no attribute 'endpoint'

Looks like the line should be self._connect(url) instead referenceing def __init__, however url is not a class variable, and it is limited within the scope of __init__. Should the variable url be stored as self.url instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants