You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an error (1) when trying to import the QAgent class from src.q_agent. Attempting to run relative import also generates an error (2).
Error 1:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-3-366876298703> in <module>
1 # No need to copy paste the same QAgent
2 # definition in every notebook, don't you think?
----> 3 from src.q_agent import QAgent
4
5 # hyper-parameters
ModuleNotFoundError: No module named 'src'
Error 2:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-4-135f3e1d5891> in <module>
1 # No need to copy paste the same QAgent
2 # definition in every notebook, don't you think?
----> 3 from ..src.q_agent import QAgent
4
5 # hyper-parameters
ValueError: attempted relative import beyond top-level package
The issue is quite clear, however what would be the most suitable solution in this case? Should I mess with the PYTHONPATH variable or should I create a file one level above notebooks where I import the src module? Maybe something else?
The text was updated successfully, but these errors were encountered:
My machine configuration:
There is an error (1) when trying to import the QAgent class from src.q_agent. Attempting to run relative import also generates an error (2).
Error 1:
Error 2:
The issue is quite clear, however what would be the most suitable solution in this case? Should I mess with the
PYTHONPATH
variable or should I create a file one level above notebooks where I import thesrc
module? Maybe something else?The text was updated successfully, but these errors were encountered: