Skip to content

PyInstaller can't find Django migration files in monorepo architecture #8809

Answered by rokm
shiwa-sh asked this question in Help
Discussion options

You must be logged in to vote

Try passing the path to the .env file to read_env (e.g., anchor it to __file__ attribute). You will also need to ensure that .env file is collected, if you have not already done so.

If no path is given, environs try to infer the path to caller via its co_filename (see here). This will not work in frozen application, because co_filename is anonymized into relative path (config/settings.py), and so it tries to access config directory in the current working directory, which does not exist.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@shiwa-sh
Comment options

@rokm
Comment options

rokm Sep 30, 2024
Maintainer

@shiwa-sh
Comment options

@rokm
Comment options

rokm Sep 30, 2024
Maintainer

Answer selected by shiwa-sh
@shiwa-sh
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants