Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

AttributeError under Python 3.9 #56

Closed
freakboy3742 opened this issue Feb 18, 2022 · 2 comments
Closed

AttributeError under Python 3.9 #56

freakboy3742 opened this issue Feb 18, 2022 · 2 comments
Labels
bug A crash or error in behavior.

Comments

@freakboy3742
Copy link
Member

Describe the bug

Via @leggewie:

Running the BeeWare tutorial 7 yields the following error:

Exception in callback ReadTransport._loop_reading(<Future pendi...op_reading()]>)
handle: <GLibHandle ReadTransport._loop_reading(<Future pendi...op_reading()]>)>
Traceback (most recent call last):
  File "/home/leggewie/.local/lib/python3.9/site-packages/gbulb/transports.py", line 146, in _loop_reading
    data = fut.result()  # Deliver data later in "finally" clause
asyncio.exceptions.InvalidStateError: Result is not set.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/leggewie/.local/lib/python3.9/site-packages/gbulb/transports.py", line 170, in _loop_reading
    except futures.InvalidStateError:
AttributeError: module 'asyncio.futures' has no attribute 'InvalidStateError'
Exception in callback ReadTransport._loop_reading(<Future finis...xe3\xc8j\xd0'>)
handle: <GLibHandle ReadTransport._loop_reading(<Future finis...xe3\xc8j\xd0'>)>
Traceback (most recent call last):
  File "/home/leggewie/.local/lib/python3.9/site-packages/gbulb/transports.py", line 140, in _loop_reading
    assert self._read_fut is fut or (
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/leggewie/.local/lib/python3.9/site-packages/gbulb/transports.py", line 170, in _loop_reading
    except futures.InvalidStateError:
AttributeError: module 'asyncio.futures' has no attribute 'InvalidStateError'

To Reproduce

Run BeeWare Tutorial 7

Expected behavior

No error; async HTTP requests complete.

Environment:

  • Operating System: Ubuntu 22.4?
  • Python version: 3.9
  • Software versions:
    • gbulb: 0.6.2
@freakboy3742 freakboy3742 added the bug A crash or error in behavior. label Feb 18, 2022
@freakboy3742
Copy link
Member Author

Investigating further; asyncio.futures.InvalidStateError exists in Python 3.7, but not 3.8. However, asyncio.InvalidStateError exists on 3.6.

@leggewie
Copy link

Thank you very much. I can confirm that #57 fixes this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A crash or error in behavior.
Projects
None yet
Development

No branches or pull requests

2 participants