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

Exception on Python 3.9 #106

Closed
1 of 4 tasks
rokups opened this issue Feb 16, 2021 · 7 comments
Closed
1 of 4 tasks

Exception on Python 3.9 #106

rokups opened this issue Feb 16, 2021 · 7 comments

Comments

@rokups
Copy link

rokups commented Feb 16, 2021

Issue type

  • bug
  • missing functionality
  • performance
  • feature request

Brief description

  File "/home/rk/src/bfx/venv/lib/python3.9/site-packages/websockets/protocol.py", line 911, in write_frame
    with (yield from self._drain_lock):
TypeError: 'Lock' object is not iterable

Steps to reproduce

  • Execute latest version on Python 3.9
Additional Notes:
@itsdeka
Copy link
Contributor

itsdeka commented Feb 18, 2021

Thank you very much for reporting this issue.
I'll open a PR soon.

@itsdeka
Copy link
Contributor

itsdeka commented Feb 18, 2021

I tried to upgrade websockets to 8.1 and there are issues with running tests/ws/* files. Are you able to run those?

@rokups
Copy link
Author

rokups commented Feb 18, 2021 via email

@ftwornot
Copy link

Why not simply change websockets version in requirements.txt from 7.0 to 8.1. At least that worked for me although I had installed 7.0 first. (honest question)

@imankulov
Copy link

Hey there! I can see that the issue has been fixed in c755d33. @itsdeka, I would appreciate if you could release a new version with the fix on PyPI. Thanks!

@itsdeka
Copy link
Contributor

itsdeka commented May 10, 2021

Thank you all, done @imankulov

@PsykotropyK
Copy link

Hello.
I installed the package by cloning the repo & while the setup.py references websockets 8.1 and this is the version I have installed, I have the same issue.
Complete stack trace is

Traceback (most recent call last):
File "D:\Apps\Python\Python39\lib\site-packages\bitfinex_api_py-1.1.14-py3.9.egg\bfxapi\websockets\generic_websocket.py", line 143, in _run_socket
File "D:\Apps\Python\Python39\lib\site-packages\bitfinex_api_py-1.1.14-py3.9.egg\bfxapi\websockets\bfx_websocket.py", line 477, in on_message
File "D:\Apps\Python\Python39\lib\site-packages\bitfinex_api_py-1.1.14-py3.9.egg\bfxapi\websockets\bfx_websocket.py", line 208, in _ws_system_handler
File "D:\Apps\Python\Python39\lib\site-packages\bitfinex_api_py-1.1.14-py3.9.egg\bfxapi\websockets\bfx_websocket.py", line 242, in _system_info_handler
File "D:\Apps\Python\Python39\lib\site-packages\bitfinex_api_py-1.1.14-py3.9.egg\bfxapi\websockets\bfx_websocket.py", line 501, in on_open
File "D:\Apps\Python\Python39\lib\site-packages\bitfinex_api_py-1.1.14-py3.9.egg\bfxapi\websockets\bfx_websocket.py", line 492, in _ws_authenticate_socket
File "D:\Apps\Python\Python39\lib\site-packages\bitfinex_api_py-1.1.14-py3.9.egg\bfxapi\websockets\generic_websocket.py", line 56, in send
File "D:\Apps\Python\Python39\lib\site-packages\websockets\protocol.py", line 467, in send
yield from self.write_frame(True, OP_TEXT, data.encode('utf-8'))
File "D:\Apps\Python\Python39\lib\site-packages\websockets\protocol.py", line 911, in write_frame
with (yield from self._drain_lock):
TypeError: 'Lock' object is not iterable

@itsdeka itsdeka closed this as completed Apr 8, 2024
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

5 participants