bookwyrm icon indicating copy to clipboard operation
bookwyrm copied to clipboard

Recent build web service will fail

Open OhScee opened this issue 2 years ago • 9 comments

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:

  1. checkout latest code (main or production branches)
  2. follow steps outlined in Installing to Production
  3. execute docker-compose up --build when advised
  4. build will fail

Screenshots Screen Shot 2022-01-30 at 17 56 07

Instance Non-live instance, on my own fork

Desktop (please complete the following information): - OS: Ubuntu

OhScee avatar Jan 30 '22 22:01 OhScee

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

mouse-reeve avatar Jan 30 '22 23:01 mouse-reeve

I'm having trouble replicating this, are you still running into this issue?

mouse-reeve avatar Feb 28 '22 19:02 mouse-reeve

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

mouse-reeve avatar Mar 19 '22 19:03 mouse-reeve

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.

darkphoenix avatar Jun 13 '22 23:06 darkphoenix

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

mouse-reeve avatar Jun 14 '22 02:06 mouse-reeve

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

darachm avatar Nov 06 '22 19:11 darachm

Exact same error, current production branch as of today (06/03/2023). Also solved by removing LANGUAGE_CODE in the .env file

damian-murphy avatar Mar 06 '23 16:03 damian-murphy

@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

hughrun avatar Aug 18 '23 23:08 hughrun

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.

SMillerDev avatar Apr 02 '24 15:04 SMillerDev