Why does pydoc work for some Django folders and not others? How to debug it?

24 Views Asked by At

I am using Django 4.2, and after setting DJANGO_SETTINGS_MODULE appropriately, I ran

python -m pydoc -b

When I visit the pydoc page, a lot of it produces pydoc, even within the modules of my Django project and application. However, occasionally it says:

ErrorDuringImport: problem in myapp.mymodule - AppRegistryNotReady: Apps aren't loaded yet.

It says this, for example, in the admin module (i.e. admin.py).

Why would it work some times and not other times? I imagine it's some particular import? How do I figure out which one?

0

There are 0 best solutions below