signal.ItimerError: [Errno 22] Invalid argument
See original GitHub issueAfter installing scalene
from pip, version 0.8.2, I get the following error:
(base) alberto@serenity:~$ python -m scalene scalene/test/testme.py
Scalene: An exception of type ItimerError occurred. Arguments:
(22, 'Invalid argument')
Traceback (most recent call last):
File "/home/alberto/miniconda3/lib/python3.7/site-packages/scalene/scalene.py", line 712, in main
profiler.start()
File "/home/alberto/miniconda3/lib/python3.7/site-packages/scalene/scalene.py", line 488, in start
Scalene.enable_signals()
File "/home/alberto/miniconda3/lib/python3.7/site-packages/scalene/scalene.py", line 196, in enable_signals
signal.setitimer(Scalene.cpu_timer_signal, Scalene.mean_signal_interval, Scalene.mean_signal_interval)
signal.ItimerError: [Errno 22] Invalid argument
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/alberto/miniconda3/lib/python3.7/site-packages/scalene/scalene.py", line 656, in exit_handler
Scalene.disable_signals()
File "/home/alberto/miniconda3/lib/python3.7/site-packages/scalene/scalene.py", line 648, in disable_signals
signal.setitimer(Scalene.cpu_timer_signal, 0)
signal.ItimerError: [Errno 22] Invalid argument
I’m running Python 3.7.4 in Ubuntu 16.04.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
OSError when setting SIGKILL handler in mac os and python
From the man 7 signal , it says. The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored. And also please refer...
Read more >ianitor OSError: [Errno 22] Invalid argument · Issue #2 - GitHub
This is caused by SIGSTOP signal raising OSError exception when trying to bind it on python3.4. Unfortunately ianitor.script module was not ...
Read more >signal.ITIMER_REAL Example - Program Talk
ITIMER_REAL, 0) return content except: signal.setitimer(signal. ... ItimerError("[Errno 22] Invalid argument") if interval < 0: raise signal.
Read more >signal — Set handlers for asynchronous events ... - Python Docs
Raised to signal an error from the underlying setitimer() or getitimer() implementation. Expect this error if an invalid interval timer or a negative...
Read more >17.4. signal — Set handlers for asynchronous events
Expect this error if an invalid interval timer or a negative time is passed to setitimer(). This error is a subtype of IOError....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, after installing Ubuntu 18.02 on WSL2, I can confirm that scalene runs just fine. Thanks!
Interesting. I just verified that it works fine on Ubuntu 19.10, Python 3.7.5. It seems to be complaining that a particular signal (
signal.ITIMER_VIRTUAL
) doesn’t exist, which is pretty surprising.Can you try invoking it with
--wallclock
? As in:python3 -m scalene --wallclock scalene/test/testme.py
Also, please do a
man setitimer
and paste that in. Seems hard to believe thatsignal.ITIMER_VIRTUAL
is not supported.thanks!