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

AnyIO related exception issue #986

Open
3 tasks done
HK-Mattew opened this issue Nov 14, 2024 · 6 comments
Open
3 tasks done

AnyIO related exception issue #986

HK-Mattew opened this issue Nov 14, 2024 · 6 comments
Labels

Comments

@HK-Mattew
Copy link
Contributor

Things to check first

  • I have checked that my issue does not already have a solution in the FAQ

  • I have searched the existing issues and didn't find my bug already reported there

  • I have checked that my bug is still present in the latest release

Version

4.0.0a5

What happened?

The problem seems to be more related to AnyIO. However, I'm not using AnyIO directly so I opened this issue here.

Exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/username/.cache/pypoetry/virtualenvs/projectx-3coxCssU-py3.10/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 810, in task_done
    self._exceptions.append(exc)
AttributeError: 'TaskGroup' object has no attribute '_exceptions'

--- Logging error in Loguru Handler #1 ---
Record was: {'elapsed': datetime.timedelta(seconds=12797, microseconds=790013), 'exception': (type=<class 'RecursionError'>, value=RecursionError('maximum recursion depth exceeded in comparison'), traceback=<traceback object at 0x7f68a7692c80>), 'extra': {}, 'file': (name='base_events.py', path='/usr/local/lib/python3.10/asyncio/base_events.py'), 'function': 'call_exception_handler', 'level': (name='ERROR', no=40, icon='❌'), 'line': 1762, 'message': 'Exception in default exception handler', 'module': 'base_events', 'name': 'asyncio.base_events', 'process': (id=6499, name='MainProcess'), 'thread': (id=140087471896320, name='Thread-2 (run_blocking_portal)'), 'time': datetime(2024, 11, 13, 19, 31, 21, 260738, tzinfo=datetime.timezone(datetime.timedelta(0), 'UTC'))}
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/username/.cache/pypoetry/virtualenvs/projectx-3coxCssU-py3.10/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 810, in task_done
    self._exceptions.append(exc)
AttributeError: 'TaskGroup' object has no attribute '_exceptions'

[APSCHEDULER] ERROR - Job 8c6ed35c-bb78-4501-95f3-4f53326ab3af raised an exception - Traceback (most recent call last):

  File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/username/.cache/pypoetry/virtualenvs/projectx-3coxCssU-py3.10/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 810, in task_done
    self._exceptions.append(exc)
AttributeError: 'TaskGroup' object has no attribute '_exceptions'

How can we reproduce the bug?

I don't know exactly.

@HK-Mattew HK-Mattew added the bug label Nov 14, 2024
@agronholm
Copy link
Owner

Which version of AnyIO is this on?

@HK-Mattew
Copy link
Contributor Author

Which version of AnyIO is this on?

anyio==4.6.2.post1

@agronholm
Copy link
Owner

Now I'd just need a clue on how to reproduce this so I can fix the problem.

@agronholm
Copy link
Owner

Also, does this happen on APScheduler master too?

@HK-Mattew
Copy link
Contributor Author

Also, does this happen on APScheduler master too?

Yes, this happened on the master branch.

@HK-Mattew
Copy link
Contributor Author

Also, does this happen on APScheduler master too?

After I made a PR here on APScheduler, this problem no longer occurred for me. I don't know if the changes in my PR have any relation to this problem (at least I don't see it). But it stopped occurring after the changes in the PR.

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

No branches or pull requests

2 participants