[Windows Support]module 'os' has no attribute 'getpgid'
See original GitHub issueWhen running env.reset()
, I encounter this error:
Initializing new Carla server...
FATAL ERROR while launching server: <class 'AttributeError'>
Error during reset: Traceback (most recent call last):
File "C:\Eer Kai Jun\Autonomous Driving\env\lib\site-packages\macad_gym\carla\multi_env.py", line 579, in reset self._init_server()
File "C:\Eer Kai Jun\Autonomous Driving\env\lib\site-packages\macad_gym\carla\multi_env.py", line 475, in _init_server live_carla_processes.add(os.getpgid(self._server_process.pid))
AttributeError: module 'os' has no attribute 'getpgid'
I think this is because the os library does not support the getpgid function in windows. Are they any workarounds for this issue?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
AttributeError: module 'os' has no attribute 'geteuid' · Issue #889
Windows support in repo2docker is "low", mostly because it is hard and because none of the devs have access to a windows machine....
Read more >Python os.geteuid() for windows - Stack Overflow
User id in Windows? I'm not sure getpass is what you want. import getpass getpass.getuser() >>> 'HelloWorld'. But be careful, the function ...
Read more >16.1. os — Miscellaneous operating system interfaces
All functions in this module raise OSError in the case of invalid or inaccessible file names and paths, or other arguments that have...
Read more >15.1. os — Miscellaneous operating system interfaces - Jython
The file has no directory entries associated with it and will be automatically deleted once there are no file descriptors for the file....
Read more >Python Examples of os.killpg - ProgramCreek.com
if not m2ee.stop(): if not m2ee.terminate(): m2ee.kill() try: this_process = os.getpgid(0) logging.debug( "Terminating process group with pgid=%s", ...
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
Hi @praveen-palanisamy, yeap that solves the problem! Thanks a lot for the help!
Ohh. Okay. Yeah, the
setsid
is also not available on Windows. I unfortunately don’t yet have a Windows machine setup to test this out now. The solution is to remove thepreexec_fn=os.setsid
argument toPopen
. I have update my comment above(https://github.com/praveen-palanisamy/macad-gym/issues/32#issuecomment-779564218) to include this change as well for Windows support. Please give it a try with this change and post what you find.