Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Scalene not working on Windows because ITIMER_PROF in signal is not supported #4

Closed
jimcarst opened this issue Jan 10, 2020 · 1 comment

Comments

@jimcarst
Copy link

Hi,

For your information, I would like to report that scalene is not working on Windows 10. I get the following error message when I try running it:

  Traceback (most recent call last):
  File "C:\...\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\...\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\...\anaconda3\lib\site-packages\scalene\__main__.py", line 1, in <module>
    from scalene import scalene
  File "C:\...\anaconda3\lib\site-packages\scalene\scalene.py", line 239, in <module>
    scalene.main()
  File "C:\...\anaconda3\lib\site-packages\scalene\scalene.py", line 218, in main
    profiler = scalene(os.path.join(program_path, os.path.basename(sys.argv[0])))
  File "C:\...\anaconda3\lib\site-packages\scalene\scalene.py", line 75, in __init__
    signal.signal(signal.SIGPROF, self.cpu_signal_handler)
AttributeError: module 'signal' has no attribute 'SIGPROF'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "C:\...\anaconda3\lib\site-packages\scalene\scalene.py", line 199, in exit_handler
    scalene.disable_signals()
  File "C:\...\anaconda3\lib\site-packages\scalene\scalene.py", line 192, in disable_signals
    signal.signal(signal.ITIMER_PROF, signal.SIG_IGN)
AttributeError: module 'signal' has no attribute 'ITIMER_PROF'

As reported here, apparently signal is not suppored fully on Windows.

@emeryberger
Copy link
Member

I have added a check that indicates that Windows is not supported (unfortunately).

jaltmayerpizzorno pushed a commit to jaltmayerpizzorno/scalene that referenced this issue Feb 28, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants