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

AttributeError: module 'signal' has no attribute 'SIGALRM' #7

Closed
echeg opened this issue Sep 20, 2017 · 4 comments
Closed

AttributeError: module 'signal' has no attribute 'SIGALRM' #7

echeg opened this issue Sep 20, 2017 · 4 comments

Comments

@echeg
Copy link

echeg commented Sep 20, 2017

On Windows, signal() can only be called with SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, or SIGTERM. A ValueError will be raised in any other case.

C:\Repos\UnityRF\ml-agents\python\unityagents\environment.py in __init__(self, file_name, worker_id, base_port)
     86                     str(file_name)))
     87 
---> 88         old_handler = signal.signal(signal.SIGALRM, timeout_handler)
     89         signal.alarm(30)  # trigger alarm in x seconds
     90         try:

AttributeError: module 'signal' has no attribute 'SIGALRM'
@ASPePeX
Copy link
Contributor

ASPePeX commented Sep 20, 2017

This is a duplicate of #5.

A easy workaround is removing the lines 10, 88, 89, 99 and 100 from /python/unityagents/environment.py. That's not a nice solution but at least it is working this way.

@awjuliani
Copy link
Contributor

awjuliani commented Sep 21, 2017

Thanks for pointing this out. We just pushed a fix to check for socket timeout in a way that is more cross-os compatible: #9. Please let me know if things work for you now.

Also closing since it is a duplicate of #5

@zhangdm
Copy link

zhangdm commented Mar 11, 2018

how to solve it ?

@lock
Copy link

lock bot commented Jan 3, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants