[BETA-Designer] ModuleNotFoundError: No module named '_anvil_designer'

Ouch!!

I have counted 34 apps that depend from the custom component HeaderWithLogin. There may be more apps that I missed.

I started following your advice, that is changing this:

import CommonFunctionsClient
from UserConfigPage import UserConfigPage

into this:

from .. import CommonFunctionsClient
from ..UserConfigPage import UserConfigPage

And it did work.

But then I remembered about the importgeddon I always have when executing the apps in PyCharm, then running tests, then using apps as dependencies, then running apps as stand alone apps, and I followed these guidelines (at paragraph “Relative vs absolute imports”): always use the app/dependency name when importing.

So I changed it into this:

from HeaderWithLogin import CommonFunctionsClient
from HeaderWithLogin.UserConfigPage import UserConfigPage

I tested with two apps and everything seems to be working well with their dependencies set to development.

Tomorrow I will crawl through all the other apps, ready to answer the phone. It will be a long day.

… or is there a better approach?