ImportError: cannot import name 'encode_traffic_light_state' from 'utilities.networks'
Opened this issue · 0 comments
Wu-didi commented
Description:
When I try to run the command python3 run/main.py -en rlad_original
, I encounter the following error:
File "/root/rlad/carla_env/core/task_actor/ego_vehicle/reward/valeo_action_updated.py", line 11, in <module>
from utilities.networks import encode_traffic_light_state
ImportError: cannot import name 'encode_traffic_light_state' from 'utilities.networks' (/root/rlad/utilities/networks.py)
It seems that the function encode_traffic_light_state
is missing from utilities/networks.py
.
Steps to Reproduce:
- Clone the repository.
- Follow the installation steps.
- Run the command:
python3 run/main.py -en rlad_original
.
Expected Behavior:
The program should execute without throwing an ImportError
.
Actual Behavior:
The program raises an ImportError
stating that the function encode_traffic_light_state
is not found in utilities/networks.py
.
Possible Solutions:
- If
encode_traffic_light_state
was intended to be part of theutilities/networks.py
module, it might be missing from the current version. Can you provide the correct implementation of this function? - If it has been deprecated or replaced, could you guide me on the correct method to handle traffic light state encoding?