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

Signal errors can be raised inside notebooks and other jupyter kernels #131

Open
Cadair opened this issue May 12, 2023 · 1 comment
Open
Labels
bug A report of or a fix for a bug or unwanted behaviour

Comments

@Cadair
Copy link
Owner

Cadair commented May 12, 2023

This is a little tricky to reliably reproduce but it seems that if you run enough downloads inside a jupyter kernel (where parfive's asyncio loop is running in a thread) the following message appears:

Exception ignored in: <function BaseEventLoop.__del__ at 0x7fe4320fc820>
Traceback (most recent call last):
  File "/usr/lib/python3.10/asyncio/base_events.py", line 687, in __del__
    self.close()
  File "/usr/lib/python3.10/asyncio/unix_events.py", line 71, in close
    self.remove_signal_handler(sig)
  File "/usr/lib/python3.10/asyncio/unix_events.py", line 160, in remove_signal_handler
    signal.signal(sig, handler)
  File "/usr/lib/python3.10/signal.py", line 56, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread of the main interpreter
@Cadair Cadair added bug A report of or a fix for a bug or unwanted behaviour help wanted and removed help wanted labels May 12, 2023
@Cadair
Copy link
Owner Author

Cadair commented May 12, 2023

It seems to happen about 50% of the time:

Kooha-2023-05-12-17-02-55.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A report of or a fix for a bug or unwanted behaviour
Projects
None yet
Development

No branches or pull requests

1 participant