Closed marcelr-bk closed 1 year ago
you probably need to add PYTHONPATH = path/to/module/
I'm also running into a similar issue when using the generate_docs function.
In my case, it can't find the module.
I'm using the following structure:
/my-repo --/src ---- /my-module ------ init.py ------ file1.py ------ file2.py (that imports file1.py by using "import my-module.file1 as file1")
and I'm running the generate_docs like this:
generate_docs( [ pathlib.Path("src/my-module/file1.py"), pathlib.Path("src/my-module/file2.py") ], ... )
Update: It worked by adding the "src" folder to python path using sys.path.append(os.path.join(os.getcwd(),"src"))
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days
Hello, I have a structure like this:
where in
bar.py
I doimport foo.common
. When running lazydocs, I get the messageFailed to generate docs for module foo.bar: AttributeError("module 'foo' has no attribute 'common'",)
However, when just starting a new Python shell and doing
import foo.bar
there are no complaints, so I'd expect it to work in Lazydocs as well.Anything that I'm missing, or is this a bug?