p-christ/Deep-Reinforcement-Learning-Algorithms-with-PyTorch

Code lines missing in Mountain_Car.py

saketadhau opened this issue · 0 comments

I tried to run the script from results/Mountain_Car.py, but I ran into an error,

Traceback (most recent call last):
  File "Mountain_Car.py", line 3, in <module>
    from agents.policy_gradient_agents.PPO import PPO
ModuleNotFoundError: No module named 'agents'

Fortunately, the problem can be solved by inserting the following lines

import sys
from os.path import dirname, abspath
sys.path.append(dirname(dirname(abspath(__file__))))

in the script Mountain_Car.py.