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

"TypeError: BaseEventLoop.create_connection() got an unexpected keyword argument 'extra_headers'" when execute dl_docs #167

Open
timherz86 opened this issue Jan 28, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@timherz86
Copy link

Description of the bug
A clear and concise description of what the bug is.

To Reproduce
While downloading documents pytr dl_docs

Error log

TypeError: BaseEventLoop.create_connection() got an unexpected keyword argument 'extra_headers'

===========================================================================
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "c:\users\tim.local\bin\pytr.exe_main.py", line 7, in
File "C:\Users\Tim\pipx\venvs\pytr\Lib\site-packages\pytr\main.py", line 266, in main
asyncio.get_event_loop().run_until_complete(dl.dl_loop())
File "C:\Program Files\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\Tim\pipx\venvs\pytr\Lib\site-packages\pytr\dl.py", line 68, in dl_loop
await self.tl.get_next_timeline_transactions()
File "C:\Users\Tim\pipx\venvs\pytr\Lib\site-packages\pytr\timeline.py", line 30, in get_next_timeline_transactions
await self.tr.timeline_transactions()
File "C:\Users\Tim\pipx\venvs\pytr\Lib\site-packages\pytr\api.py", line 506, in timeline_transactions
return await self.subscribe({"type": "timelineTransactions", "after": after})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tim\pipx\venvs\pytr\Lib\site-packages\pytr\api.py", line 322, in subscribe
ws = await self._get_ws()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tim\pipx\venvs\pytr\Lib\site-packages\pytr\api.py", line 301, in _get_ws
self._ws = await websockets.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tim\pipx\venvs\pytr\Lib\site-packages\websockets\asyncio\client.py", line 444, in await_impl
self.connection = await self.create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tim\pipx\venvs\pytr\Lib\site-packages\websockets\asyncio\client.py", line 370, in create_connection
_, connection = await loop.create_connection(factory, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BaseEventLoop.create_connection() got an unexpected keyword argument 'extra_headers'

Environment

  • OS: [e.g. Linux]
  • 0.3.1, windows 11
@timherz86 timherz86 added the bug Something isn't working label Jan 28, 2025
@aitoralzola22
Copy link

Hi @timherz86
Same error, I solved doing this:

`pip uninstall websockets

pip install websockets==10.1`

With this version I dont have errors. Hope this helps you.

@Penaus
Copy link

Penaus commented Feb 1, 2025

Just a ref as this error is connected to #142 nd #143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants