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
My system is linux, and when I use main.py, it calls config.py. When “import utils.misc as misc“ and so on, it will report an error. However, if you add an empty init.py under src/utils, there will be no error.
The text was updated successfully, but these errors were encountered:
If someone has a similar issue related to import modules, the following command will be helpful.
import pathlib
import sys
import os
# the path of the directory containing this file
root_path = pathlib.Path(__file__).parent.resolve()
root_path = os.path.join(str(root_path), "../")
sys.path.append(root_path)
My system is linux, and when I use main.py, it calls config.py. When “import utils.misc as misc“ and so on, it will report an error. However, if you add an empty init.py under src/utils, there will be no error.
The text was updated successfully, but these errors were encountered: