'NoneType' object has no attribute 'pid'
Closed this issue · 0 comments
Hi, I have CARLA version 0.9.14 with Ubuntu. I am trying to run the script of single agent and I am having this error. I have build CARLA from source. I have tried both ways:
- I started the server and then run the client script
- I have not started the server thinking I don't need to start server as this error is showing the server is started:
Error is this:
/home/.local/lib/python3.8/site-packages/gym/utils/passive_env_checker.py:20: UserWarning: WARN: It seems a Box observation space is an image but the dtype
is not np.uint8
, actual type: float32. If the Box observation space is not an image, we recommend flattening the observation to have only a 1D vector.
logger.warn(
/home/.local/lib/python3.8/site-packages/gym/utils/passive_env_checker.py:174: UserWarning: WARN: Future gym versions will require that Env.reset
can be passed a seed
instead of using Env.seed
for resetting the environment random number generator.
logger.warn(
/home/.local/lib/python3.8/site-packages/gym/utils/passive_env_checker.py:187: UserWarning: WARN: Future gym versions will require that Env.reset
can be passed options
to allow the environment initialisation to be passed additional information.
logger.warn(
Initializing new Carla server...
FATAL ERROR while launching server: <class 'PermissionError'>
Error during reset: Traceback (most recent call last):
File "/home/.local/lib/python3.8/site-packages/macad_gym/carla/multi_env.py", line 579, in reset
self._init_server()
File "/home/.local/lib/python3.8/site-packages/macad_gym/carla/multi_env.py", line 475, in _init_server
live_carla_processes.add(os.getpgid(self._server_process.pid))
AttributeError: 'NoneType' object has no attribute 'pid'
reset(): Retry #: 1/2
Clearing Carla server state
Traceback (most recent call last):
File "gym1.py", line 35, in
obs = env.reset()
File "/home/.local/lib/python3.8/site-packages/gym/wrappers/order_enforcing.py", line 42, in reset
return self.env.reset(**kwargs)
File "/home/.local/lib/python3.8/site-packages/gym/wrappers/env_checker.py", line 45, in reset
return env_reset_passive_checker(self.env, **kwargs)
File "/home/.local/lib/python3.8/site-packages/gym/utils/passive_env_checker.py", line 192, in env_reset_passive_checker
result = env.reset(**kwargs)
File "/home/.local/lib/python3.8/site-packages/macad_gym/carla/multi_env.py", line 587, in reset
raise error
File "/home/.local/lib/python3.8/site-packages/macad_gym/carla/multi_env.py", line 579, in reset
self._init_server()
File "/home/.local/lib/python3.8/site-packages/macad_gym/carla/multi_env.py", line 475, in _init_server
live_carla_processes.add(os.getpgid(self._server_process.pid))
AttributeError: 'NoneType' object has no attribute 'pid'
Killing live carla processes set()
Can please help me out?
Thanks