bookwyrm
bookwyrm copied to clipboard
Recent build web service will fail
Describe the bug
On a clean pull of the repo with the latest code, docker-compose up --build
will fail on the web service with the following error
raise OSError('No translation files found for default language %s.' % settings.LANGUAGE_CODE)
0m OSError: No translation files found for default language "en-us".
To Reproduce Steps to reproduce the behavior:
- checkout latest code (main or production branches)
- follow steps outlined in Installing to Production
- execute
docker-compose up --build
when advised - build will fail
Screenshots
Instance Non-live instance, on my own fork
Desktop (please complete the following information): - OS: Ubuntu
This is probably related to #1855. I'll take a closer look when I get a chance, but I expect a quick fix would be to delete the LANGUAGE_CODE
variable from your .env file
I'm having trouble replicating this, are you still running into this issue?
Since this has been sitting for a while, I'm going to close it. Please feel super super welcome to re-open if you're still having issues! I'd be happy to help
FWIW, I hit this same issue in current production. Resolved it by removing LANGUAGE_CODE, but if you want to open a new issue or reopen this one to figure out the details, I'd be open to helping out.
I'd love to get to the bottom of this, I'm not sure why I wasn't able to consistently replicate the erro, so help would be much appreciated
Same experience here. Failed to find translation files for "en-US", comenting out LANGUAGE_CODE
line in .env
worked
Running the docker on ubuntu with LANG=en_US.UTF-8
reported from locale
Exact same error, current production branch as of today (06/03/2023). Also solved by removing LANGUAGE_CODE
in the .env
file
@mouse-reeve This is suggesting the issue may be that we need to run makemessages
on initial install (probably as part of ./bw-dev setup
): https://stackoverflow.com/questions/37218145/no-translation-file-found-for-default-language
I just had the same on a new setup on an ARM machine (with LANG=en_US.UTF-8
in the environment). Running ./bw-dev makemessages
as "suggested" above did not help anything, commenting out the LANGUAGE_CODE
did.