bookwyrm-social / bookwyrm

Social reading and reviewing, decentralized with ActivityPub
http://joinbookwyrm.com/
Other
2.24k stars 263 forks source link

Recent build web service will fail #1892

Open OhScee opened 2 years ago

OhScee commented 2 years ago

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):

mouse-reeve commented 2 years ago

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 commented 2 years ago

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

mouse-reeve commented 2 years ago

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

darkphoenix commented 2 years ago

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.

mouse-reeve commented 2 years ago

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

darachm commented 1 year ago

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

damian-murphy commented 1 year ago

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

hughrun commented 1 year ago

@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

SMillerDev commented 6 months ago

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.