sphinx-autorun icon indicating copy to clipboard operation
sphinx-autorun copied to clipboard

ModuleNotFoundError when importing from working directory

Open kostrykin opened this issue 6 months ago • 5 comments

Importing a package from the working directory gives me a ModuleNotFoundError.

I have checked os.getcwd() and it is correct.

I have tried the most recent version of this extension, that is 2649928e013d4a6a80fbf66485860692ee2d3d5d.

I guess that the error is due to sys.path not containing the working directory:

[
  '/working-directory/.venv/lib/python3.11/site-packages/sphinx_autorun',
  '/opt/homebrew/Caskroom/miniforge/base/envs/my-conda-env/lib/python311.zip',
  '/opt/homebrew/Caskroom/miniforge/base/envs/my-conda-env/lib/python3.11',
  '/opt/homebrew/Caskroom/miniforge/base/envs/my-conda-env/lib/python3.11/lib-dynload',
  '/working-directory/.venv/lib/python3.11/site-packages'
]

kostrykin avatar Aug 18 '24 21:08 kostrykin