-
I am trying to build a Django project using PyInstaller, but I'm encountering an issue related to migration files when working with a monorepo structure. Build Command:
INSTALLED_APPS in settings:
Error Message:
This error occurs when PyInstaller attempts to locate migration files for the api app. It seems like PyInstaller can't find the migration files in my monorepo structure.
Any help would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Answered by
rokm
Sep 30, 2024
Replies: 1 comment 7 replies
-
Does it help if you add an (empty) |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try passing the path to the
.env
file toread_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 itsco_filename
(see here). This will not work in frozen application, becauseco_filename
is anonymized into relative path (config/settings.py
), and so it tries to accessconfig
directory in the current working directory, which does not exist.