WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.62k stars 1.02k forks source link

Upgrading Weblate docker image getting Internal Server Error #2421

Closed rwrx closed 5 years ago

rwrx commented 5 years ago

Hello, I have an installation of Weblate in Docker. Today I decided to upgrade from Weblate 3.2.2 to 3.3 with steps described here: https://docs.weblate.org/en/latest/admin/deployments.html#upgrading-docker-container . But when I have opened it in web browser and clicked on translation project it shows me an Internal Server Error message. In the Docker I am getting this log (from the beginning of starting of Weblate docker image):

Starting weblatedocker_cache_1 ...
Starting weblatedocker_database_1 ...
Starting weblatedocker_cache_1
Starting weblatedocker_database_1 ... done
Starting weblatedocker_weblate_1 ...
Starting weblatedocker_weblate_1 ... done
Attaching to weblatedocker_cache_1, weblatedocker_database_1, weblatedocker_weblate_1
cache_1     | 1:C 30 Nov 22:33:23.991 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
cache_1     | 1:C 30 Nov 22:33:23.991 # Redis version=4.0.11, bits=64, commit=00000000, modified=0, pid=1, just started
cache_1     | 1:C 30 Nov 22:33:23.991 # Configuration loaded
cache_1     | 1:M 30 Nov 22:33:23.993 * Running mode=standalone, port=6379.
cache_1     | 1:M 30 Nov 22:33:23.993 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
cache_1     | 1:M 30 Nov 22:33:23.993 # Server initialized
cache_1     | 1:M 30 Nov 22:33:23.993 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
cache_1     | 1:M 30 Nov 22:33:23.993 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
database_1  | LOG:  database system was shut down at 2018-11-30 22:32:36 UTC
database_1  | LOG:  MultiXact member wraparound protections are now enabled
database_1  | LOG:  database system is ready to accept connections
database_1  | LOG:  autovacuum launcher started
weblate_1   | redis is unavailable - sleeping
cache_1     | 1:M 30 Nov 22:33:26.322 * DB loaded from append only file: 2.330 seconds
cache_1     | 1:M 30 Nov 22:33:26.323 * Ready to accept connections
weblate_1   | Postgres is up
weblate_1   | Operations to perform:
weblate_1   |   Apply all migrations: accounts, addons, admin, auth, authtoken, checks, contenttypes, gitexport, lang, memory, screenshots, sessions, sites, social_django, trans, weblate_auth, wladmin
weblate_1   | Running migrations:
weblate_1   |   No migrations to apply.
weblate_1   |
weblate_1   | 0 static files copied to '/app/data/static', 191 unmodified.
weblate_1   | Creating user admin
weblate_1   | /usr/lib/python2.7/dist-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
weblate_1   |   'Supervisord is running as root and it is searching '
weblate_1   | 2018-11-30 22:33:45,482 CRIT Supervisor running as root (no user in config file)
weblate_1   | 2018-11-30 22:33:45,482 INFO Included extra file "/etc/supervisor/conf.d/supervisor.conf" during parsing
weblate_1   | Unlinking stale socket /var/run/supervisor.sock
weblate_1   | 2018-11-30 22:33:45,798 INFO RPC interface 'supervisor' initialized
weblate_1   | 2018-11-30 22:33:45,799 CRIT Server 'unix_http_server' running without any HTTP authentication checking
weblate_1   | 2018-11-30 22:33:45,800 INFO supervisord started with pid 1
weblate_1   | 2018-11-30 22:33:46,803 INFO spawned: 'celery' with pid 106
weblate_1   | 2018-11-30 22:33:46,806 INFO spawned: 'nginx' with pid 107
weblate_1   | 2018-11-30 22:33:46,812 INFO spawned: 'uwsgi' with pid 108
weblate_1   | [uWSGI] getting INI configuration from /usr/share/uwsgi/conf/default.ini
weblate_1   | [uWSGI] getting INI configuration from /etc/uwsgi/apps-enabled/weblate.ini
weblate_1   | Fri Nov 30 22:33:46 2018 - *** Starting uWSGI 2.0.15-debian (64bit) on [Fri Nov 30 22:33:46 2018] ***
weblate_1   | Fri Nov 30 22:33:46 2018 - compiled with version: 7.3.0 on 28 September 2018 15:41:15
weblate_1   | Fri Nov 30 22:33:46 2018 - os: Linux-4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018
weblate_1   | Fri Nov 30 22:33:46 2018 - nodename: 77af7fb53ba4
weblate_1   | Fri Nov 30 22:33:46 2018 - machine: x86_64
weblate_1   | Fri Nov 30 22:33:46 2018 - clock source: unix
weblate_1   | Fri Nov 30 22:33:46 2018 - pcre jit disabled
weblate_1   | Fri Nov 30 22:33:46 2018 - detected number of CPU cores: 1
weblate_1   | Fri Nov 30 22:33:46 2018 - current working directory: /
weblate_1   | Fri Nov 30 22:33:46 2018 - writing pidfile to /run/uwsgi/app/weblate/pid
weblate_1   | Fri Nov 30 22:33:46 2018 - detected binary path: /usr/bin/uwsgi-core
weblate_1   | Fri Nov 30 22:33:46 2018 - dropping root privileges as early as possible
weblate_1   | Fri Nov 30 22:33:46 2018 - setgid() to 1000
weblate_1   | Fri Nov 30 22:33:46 2018 - setuid() to 1000
weblate_1   | Fri Nov 30 22:33:46 2018 - your memory page size is 4096 bytes
weblate_1   | Fri Nov 30 22:33:46 2018 -  *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers ***
weblate_1   | Fri Nov 30 22:33:46 2018 - detected max file descriptor number: 1048576
weblate_1   | Fri Nov 30 22:33:46 2018 - lock engine: pthread robust mutexes
weblate_1   | Fri Nov 30 22:33:46 2018 - thunder lock: disabled (you can enable it with --thunder-lock)
weblate_1   | Fri Nov 30 22:33:46 2018 - uwsgi socket 0 bound to UNIX address /run/uwsgi/app/weblate/socket fd 3
weblate_1   | Fri Nov 30 22:33:46 2018 - dropping root privileges after socket binding
weblate_1   | Fri Nov 30 22:33:46 2018 - Python version: 3.6.7 (default, Oct 22 2018, 11:32:17)  [GCC 8.2.0]
weblate_1   | Fri Nov 30 22:33:47 2018 - Python main interpreter initialized at 0x564345d15260
weblate_1   | Fri Nov 30 22:33:47 2018 - dropping root privileges after plugin initialization
weblate_1   | Fri Nov 30 22:33:47 2018 - python threads support enabled
weblate_1   | Fri Nov 30 22:33:47 2018 - your server socket listen backlog is limited to 100 connections
weblate_1   | Fri Nov 30 22:33:47 2018 - your mercy for graceful operations on workers is 60 seconds
weblate_1   | Fri Nov 30 22:33:47 2018 - mapped 538048 bytes (525 KB) for 6 cores
weblate_1   | Fri Nov 30 22:33:47 2018 - *** Operational MODE: preforking ***
weblate_1   | Fri Nov 30 22:33:47 2018 - added /usr/local/lib/python3.6/dist-packages/ to pythonpath.
weblate_1   | 2018-11-30 22:33:48,036 INFO success: celery entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2018-11-30 22:33:48,037 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | 2018-11-30 22:33:48,037 INFO success: uwsgi entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
weblate_1   | Fri Nov 30 22:33:51 2018 - WSGI app 0 (mountpoint='') ready in 4 seconds on interpreter 0x564345d15260 pid: 108 (default app)
weblate_1   | Fri Nov 30 22:33:51 2018 - dropping root privileges after application loading
weblate_1   | Fri Nov 30 22:33:51 2018 - *** uWSGI is running in multiple interpreter mode ***
weblate_1   | Fri Nov 30 22:33:51 2018 - spawned uWSGI master process (pid: 108)
weblate_1   | Fri Nov 30 22:33:51 2018 - spawned uWSGI worker 1 (pid: 130, cores: 1)
weblate_1   | Fri Nov 30 22:33:51 2018 - spawned uWSGI worker 2 (pid: 131, cores: 1)
weblate_1   | Fri Nov 30 22:33:51 2018 - spawned uWSGI worker 3 (pid: 132, cores: 1)
weblate_1   | Fri Nov 30 22:33:51 2018 - spawned uWSGI worker 4 (pid: 133, cores: 1)
weblate_1   | Fri Nov 30 22:33:51 2018 - spawned uWSGI worker 5 (pid: 134, cores: 1)
weblate_1   | Fri Nov 30 22:33:51 2018 - spawned uWSGI worker 6 (pid: 135, cores: 1)
weblate_1   | Fri Nov 30 22:33:51 2018 - *** Stats server enabled on :1717 fd: 20 ***
weblate_1   | [2018-11-30 22:33:52,178: INFO/MainProcess] Connected to redis://cache:6379/1
weblate_1   | [2018-11-30 22:33:52,204: INFO/MainProcess] mingle: searching for neighbors
weblate_1   | [2018-11-30 22:33:53,249: INFO/MainProcess] mingle: all alone
weblate_1   | [2018-11-30 22:33:54,465: INFO/Beat] beat: Starting...
weblate_1   | [2018-11-30 22:33:54,486: ERROR/Beat] Process Beat
weblate_1   | Traceback (most recent call last):
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/kombu/utils/objects.py", line 42, in __get__
weblate_1   |     return obj.__dict__[self.__name__]
weblate_1   | KeyError: 'scheduler'
weblate_1   |
weblate_1   | During handling of the above exception, another exception occurred:
weblate_1   |
weblate_1   | Traceback (most recent call last):
weblate_1   |   File "/usr/lib/python3.6/shelve.py", line 111, in __getitem__
weblate_1   |     value = self.cache[key]
weblate_1   | KeyError: 'entries'
weblate_1   |
weblate_1   | During handling of the above exception, another exception occurred:
weblate_1   |
weblate_1   | Traceback (most recent call last):
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 515, in _create_schedule
weblate_1   |     self._store[str('entries')]
weblate_1   |   File "/usr/lib/python3.6/shelve.py", line 113, in __getitem__
weblate_1   |     f = BytesIO(self.dict[key.encode(self.keyencoding)])
weblate_1   | KeyError: b'entries'
weblate_1   |
weblate_1   | During handling of the above exception, another exception occurred:
weblate_1   |
weblate_1   | Traceback (most recent call last):
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/billiard/process.py", line 327, in _bootstrap
weblate_1   |     self.run()
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 664, in run
weblate_1   |     self.service.start(embedded_process=True)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 579, in start
weblate_1   |     humanize_seconds(self.scheduler.max_interval))
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/kombu/utils/objects.py", line 44, in __get__
weblate_1   |     value = obj.__dict__[self.__name__] = self.__get(obj)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 623, in scheduler
weblate_1   |     return self.get_scheduler()
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 618, in get_scheduler
weblate_1   |     lazy=lazy,
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 458, in __init__
weblate_1   |     Scheduler.__init__(self, *args, **kwargs)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 225, in __init__
weblate_1   |     self.setup_schedule()
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 486, in setup_schedule
weblate_1   |     self._create_schedule()
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 519, in _create_schedule
weblate_1   |     self._store[str('entries')] = {}
weblate_1   |   File "/usr/lib/python3.6/shelve.py", line 125, in __setitem__
weblate_1   |     self.dict[key.encode(self.keyencoding)] = f.getvalue()
weblate_1   | _dbm.error: cannot add item to database
weblate_1   | [2018-11-30 22:33:54,495: WARNING/Beat] Process Beat:
weblate_1   | [2018-11-30 22:33:54,496: WARNING/Beat] Traceback (most recent call last):
weblate_1   | [2018-11-30 22:33:54,499: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/kombu/utils/objects.py", line 42, in __get__
weblate_1   |     return obj.__dict__[self.__name__]
weblate_1   | [2018-11-30 22:33:54,500: WARNING/Beat] KeyError: 'scheduler'
weblate_1   | [2018-11-30 22:33:54,501: WARNING/Beat] During handling of the above exception, another exception occurred:
weblate_1   | [2018-11-30 22:33:54,502: WARNING/Beat] Traceback (most recent call last):
weblate_1   | [2018-11-30 22:33:54,503: WARNING/Beat] File "/usr/lib/python3.6/shelve.py", line 111, in __getitem__
weblate_1   |     value = self.cache[key]
weblate_1   | [2018-11-30 22:33:54,503: WARNING/Beat] KeyError: 'entries'
weblate_1   | [2018-11-30 22:33:54,504: WARNING/Beat] During handling of the above exception, another exception occurred:
weblate_1   | [2018-11-30 22:33:54,505: WARNING/Beat] Traceback (most recent call last):
weblate_1   | [2018-11-30 22:33:54,506: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 515, in _create_schedule
weblate_1   |     self._store[str('entries')]
weblate_1   | [2018-11-30 22:33:54,507: WARNING/Beat] File "/usr/lib/python3.6/shelve.py", line 113, in __getitem__
weblate_1   |     f = BytesIO(self.dict[key.encode(self.keyencoding)])
weblate_1   | [2018-11-30 22:33:54,508: WARNING/Beat] KeyError: b'entries'
weblate_1   | [2018-11-30 22:33:54,509: WARNING/Beat] During handling of the above exception, another exception occurred:
weblate_1   | [2018-11-30 22:33:54,510: WARNING/Beat] Traceback (most recent call last):
weblate_1   | [2018-11-30 22:33:54,512: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/billiard/process.py", line 327, in _bootstrap
weblate_1   |     self.run()
weblate_1   | [2018-11-30 22:33:54,513: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 664, in run
weblate_1   |     self.service.start(embedded_process=True)
weblate_1   | [2018-11-30 22:33:54,514: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 579, in start
weblate_1   |     humanize_seconds(self.scheduler.max_interval))
weblate_1   | [2018-11-30 22:33:54,515: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/kombu/utils/objects.py", line 44, in __get__
weblate_1   |     value = obj.__dict__[self.__name__] = self.__get(obj)
weblate_1   | [2018-11-30 22:33:54,516: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 623, in scheduler
weblate_1   |     return self.get_scheduler()
weblate_1   | [2018-11-30 22:33:54,519: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 618, in get_scheduler
weblate_1   |     lazy=lazy,
weblate_1   | [2018-11-30 22:33:54,520: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 458, in __init__
weblate_1   |     Scheduler.__init__(self, *args, **kwargs)
weblate_1   | [2018-11-30 22:33:54,521: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 225, in __init__
weblate_1   |     self.setup_schedule()
weblate_1   | [2018-11-30 22:33:54,521: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 486, in setup_schedule
weblate_1   |     self._create_schedule()
weblate_1   | [2018-11-30 22:33:54,522: WARNING/Beat] File "/usr/local/lib/python3.6/dist-packages/celery/beat.py", line 519, in _create_schedule
weblate_1   |     self._store[str('entries')] = {}
weblate_1   | [2018-11-30 22:33:54,523: WARNING/Beat] File "/usr/lib/python3.6/shelve.py", line 125, in __setitem__
weblate_1   |     self.dict[key.encode(self.keyencoding)] = f.getvalue()
weblate_1   | [2018-11-30 22:33:54,524: WARNING/Beat] _dbm.error: cannot add item to database
weblate_1   | [2018-11-30 22:33:54,525: WARNING/Beat] Exception ignored in:
weblate_1   | [2018-11-30 22:33:54,526: WARNING/Beat] <bound method Shelf.__del__ of <shelve.DbfilenameShelf object at 0x7f6964ec07f0>>
weblate_1   | [2018-11-30 22:33:54,527: WARNING/Beat] Traceback (most recent call last):
weblate_1   | [2018-11-30 22:33:54,528: WARNING/Beat] File "/usr/lib/python3.6/shelve.py", line 162, in __del__
weblate_1   | [2018-11-30 22:33:54,529: WARNING/Beat] self.close()
weblate_1   | [2018-11-30 22:33:54,530: WARNING/Beat] File "/usr/lib/python3.6/shelve.py", line 144, in close
weblate_1   | [2018-11-30 22:33:54,531: WARNING/Beat] self.sync()
weblate_1   | [2018-11-30 22:33:54,532: WARNING/Beat] File "/usr/lib/python3.6/shelve.py", line 168, in sync
weblate_1   | [2018-11-30 22:33:54,533: WARNING/Beat] self[key] = entry
weblate_1   | [2018-11-30 22:33:54,534: WARNING/Beat] File "/usr/lib/python3.6/shelve.py", line 125, in __setitem__
weblate_1   | [2018-11-30 22:33:54,534: WARNING/Beat] self.dict[key.encode(self.keyencoding)] = f.getvalue()
weblate_1   | [2018-11-30 22:33:54,535: WARNING/Beat] _dbm
weblate_1   | [2018-11-30 22:33:54,536: WARNING/Beat] .
weblate_1   | [2018-11-30 22:33:54,537: WARNING/Beat] error
weblate_1   | [2018-11-30 22:33:54,537: WARNING/Beat] :
weblate_1   | [2018-11-30 22:33:54,538: WARNING/Beat] cannot add item to database
weblate_1   | 172.24.0.1 - - [30/Nov/2018:22:34:16 +0000] "GET /projects/gpxviewer/ HTTP/1.0" 200 54769 "https://translate.vecturagames.com/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0"
weblate_1   | [pid: 135|app: 0|req: 1/1] 172.24.0.1 () {46 vars in 776 bytes} [Fri Nov 30 22:34:14 2018] GET /projects/gpxviewer/ => generated 54769 bytes in 1933 msecs (HTTP/1.0 200) 11 headers in 681 bytes (1 switches on core 0)
weblate_1   | 172.24.0.1 - - [30/Nov/2018:22:34:16 +0000] "GET /static/CACHE/css/4e29d378ed94.css HTTP/1.0" 200 231124 "https://translate.vecturagames.com/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0"
weblate_1   | 172.24.0.1 - - [30/Nov/2018:22:34:17 +0000] "GET /widgets/gpxviewer/-/svg-badge.svg HTTP/1.0" 200 768 "https://translate.vecturagames.com/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0"
weblate_1   | [pid: 134|app: 0|req: 1/2] 172.24.0.1 () {44 vars in 709 bytes} [Fri Nov 30 22:34:16 2018] GET /widgets/gpxviewer/-/svg-badge.svg => generated 768 bytes in 495 msecs (HTTP/1.0 200) 8 headers in 438 bytes (1 switches on core 0)
weblate_1   | --- Logging error ---
weblate_1   | Traceback (most recent call last):
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py", line 126, in _get_response
weblate_1   |     response = self.process_exception_by_middleware(e, request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py", line 124, in _get_response
weblate_1   |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
weblate_1   |     response = view_func(request, *args, **kwargs)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/weblate/trans/views/basic.py", line 220, in show_component
weblate_1   |     'search_form': SearchForm(),
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/weblate/trans/util.py", line 236, in render
weblate_1   |     return django_render(request, template, context, status=status)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/shortcuts.py", line 36, in render
weblate_1   |     content = loader.render_to_string(template_name, context, request, using=using)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/loader.py", line 62, in render_to_string
weblate_1   |     return template.render(context, request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/backends/django.py", line 61, in render
weblate_1   |     return self.template.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 171, in render
weblate_1   |     return self._render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 163, in _render
weblate_1   |     return self.nodelist.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 937, in render
weblate_1   |     bit = node.render_annotated(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 904, in render_annotated
weblate_1   |     return self.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/loader_tags.py", line 150, in render
weblate_1   |     return compiled_parent._render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 163, in _render
weblate_1   |     return self.nodelist.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 937, in render
weblate_1   |     bit = node.render_annotated(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 904, in render_annotated
weblate_1   |     return self.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/loader_tags.py", line 62, in render
weblate_1   |     result = block.nodelist.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 937, in render
weblate_1   |     bit = node.render_annotated(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 904, in render_annotated
weblate_1   |     return self.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/loader_tags.py", line 188, in render
weblate_1   |     return template.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 173, in render
weblate_1   |     return self._render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 163, in _render
weblate_1   |     return self.nodelist.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 937, in render
weblate_1   |     bit = node.render_annotated(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 904, in render_annotated
weblate_1   |     return self.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/defaulttags.py", line 309, in render
weblate_1   |     return nodelist.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 937, in render
weblate_1   |     bit = node.render_annotated(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 904, in render_annotated
weblate_1   |     return self.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/defaulttags.py", line 512, in render
weblate_1   |     return self.nodelist.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 937, in render
weblate_1   |     bit = node.render_annotated(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 904, in render_annotated
weblate_1   |     return self.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/loader_tags.py", line 188, in render
weblate_1   |     return template.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 173, in render
weblate_1   |     return self._render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 163, in _render
weblate_1   |     return self.nodelist.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 937, in render
weblate_1   |     bit = node.render_annotated(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 904, in render_annotated
weblate_1   |     return self.render(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/templatetags/i18n.py", line 132, in render
weblate_1   |     tmp_context[var] = val.resolve(context)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/template/base.py", line 694, in resolve
weblate_1   |     obj = template_localtime(obj, context.use_tz)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/utils/timezone.py", line 177, in template_localtime
weblate_1   |     not is_naive(value) and
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/utils/timezone.py", line 255, in is_naive
weblate_1   |     return value.utcoffset() is None
weblate_1   |   File "/usr/lib/python3/dist-packages/dateutil/tz/tz.py", line 178, in utcoffset
weblate_1   |     if self._isdst(dt):
weblate_1   |   File "/usr/lib/python3/dist-packages/dateutil/tz/tz.py", line 243, in _isdst
weblate_1   |     if not self._hasdst:
weblate_1   | AttributeError: 'tzlocal' object has no attribute '_hasdst'
weblate_1   |
weblate_1   | During handling of the above exception, another exception occurred:
weblate_1   |
weblate_1   | Traceback (most recent call last):
weblate_1   |   File "/usr/lib/python3.6/logging/handlers.py", line 936, in emit
weblate_1   |     self.socket.send(msg)
weblate_1   | OSError: [Errno 9] Bad file descriptor
weblate_1   |
weblate_1   | During handling of the above exception, another exception occurred:
weblate_1   |
weblate_1   | Traceback (most recent call last):
weblate_1   |   File "/usr/lib/python3.6/logging/handlers.py", line 857, in _connect_unixsocket
weblate_1   |     self.socket.connect(address)
weblate_1   | FileNotFoundError: [Errno 2] No such file or directory
weblate_1   |
weblate_1   | During handling of the above exception, another exception occurred:
weblate_1   |
weblate_1   | Traceback (most recent call last):
weblate_1   |   File "/usr/lib/python3.6/logging/handlers.py", line 939, in emit
weblate_1   |     self._connect_unixsocket(self.address)
weblate_1   |   File "/usr/lib/python3.6/logging/handlers.py", line 868, in _connect_unixsocket
weblate_1   |     self.socket.connect(address)
weblate_1   | FileNotFoundError: [Errno 2] No such file or directory
weblate_1   | Call stack:
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/raven/middleware.py", line 100, in __call__
weblate_1   |     iterable = self.application(environ, start_response)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/wsgi.py", line 142, in __call__
weblate_1   |     response = self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py", line 78, in get_response
weblate_1   |     response = self._middleware_chain(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/weblate/middleware.py", line 52, in __call__
weblate_1   |     return self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/utils/deprecation.py", line 91, in __call__
weblate_1   |     response = response or self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/utils/deprecation.py", line 91, in __call__
weblate_1   |     response = response or self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/utils/deprecation.py", line 91, in __call__
weblate_1   |     response = response or self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/utils/deprecation.py", line 91, in __call__
weblate_1   |     response = response or self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/utils/deprecation.py", line 91, in __call__
weblate_1   |     response = response or self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/weblate/accounts/middleware.py", line 58, in __call__
weblate_1   |     return self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/utils/deprecation.py", line 91, in __call__
weblate_1   |     response = response or self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/utils/deprecation.py", line 91, in __call__
weblate_1   |     response = response or self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/utils/deprecation.py", line 91, in __call__
weblate_1   |     response = response or self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/weblate/accounts/middleware.py", line 141, in __call__
weblate_1   |     return self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 34, in inner
weblate_1   |     response = get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/weblate/middleware.py", line 61, in __call__
weblate_1   |     response = self.get_response(request)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 36, in inner
weblate_1   |     response = response_for_exception(request, exc)
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py", line 95, in response_for_exception
weblate_1   |     exc_info=sys.exc_info(),
weblate_1   |   File "/usr/local/lib/python3.6/dist-packages/django/utils/log.py", line 228, in log_response
weblate_1   |     exc_info=exc_info,
weblate_1   | Message: '%s: %s'
weblate_1   | Arguments: ('Internal Server Error', '/projects/gpxviewer/gpxviewer-translations/')
weblate_1   | 172.24.0.1 - - [30/Nov/2018:22:34:24 +0000] "GET /projects/gpxviewer/gpxviewer-translations/ HTTP/1.0" 500 5532 "https://translate.vecturagames.com/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0"
weblate_1   | [pid: 135|app: 0|req: 2/3] 172.24.0.1 () {46 vars in 822 bytes} [Fri Nov 30 22:34:18 2018] GET /projects/gpxviewer/gpxviewer-translations/ => generated 5532 bytes in 5630 msecs (HTTP/1.0 500) 8 headers in 454 bytes (1 switches on core 0)
weblate_1   | 172.24.0.1 - - [30/Nov/2018:22:34:24 +0000] "GET /static/CACHE/css/4e29d378ed94.css HTTP/1.0" 200 231124 "https://translate.vecturagames.com/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0"

I am not sure what could be wrong, or what should I do to fix this, previously when I updgraded Weblate docker image it just worked.

nijel commented 5 years ago

I can not reproduce this and it's also working fine in our CI tests. What's your setting for timezone?

rwrx commented 5 years ago

Thank you. It is weird, now it is working without any problems. I didn't do anything.

sbidoul commented 5 years ago

I'm hitting the same issue. Could it be related to Sentry?

sbidoul commented 5 years ago

I my case WEBLATE_TIME_ZONE is not set in the docker-compose environment.

nijel commented 5 years ago

I'm running this with Sentry as well and I observe no such issues. Any customization of the configuration?

paulpach commented 5 years ago

I tried both without setting WEBLATE_TIME_ZONE and by setting WEBLATE_TIME_ZONE to America/Chicago and I get the same error.

I also noticed dateutil is version 2.6.1 in that docker image, which is ancient. perhaps we can upgrade to 2.7.5?

paulpach commented 5 years ago

I made no customization at all to the docker image. Here are the environment variables passed to it:

WEBLATE_DEBUG=0
WEBLATE_SERVICE_HOST=10.35.255.119
WEBLATE_LOGLEVEL=DEBUG
WEBLATE_EMAIL_PORT=587
WEBLATE_ADMIN_EMAIL=*****
WEBLATE_TIME_ZONE=America/Chicago
WEBLATE_PORT=tcp://10.35.255.119:80
WEBLATE_PORT_80_TCP_PORT=80
WEBLATE_PORT_80_TCP_ADDR=10.35.255.119
WEBLATE_REGISTRATION_OPEN=1
WEBLATE_EMAIL_HOST=smtp.sendgrid.net
WEBLATE_ALLOWED_HOSTS=translate.blockstory.net,*
WEBLATE_PORT_80_TCP_PROTO=tcp
WEBLATE_SERVICE_PORT=80
WEBLATE_EMAIL_USER=*****
WEBLATE_ADMIN_PASSWORD=*****
WEBLATE_PORT_80_TCP=tcp://10.35.255.119:80
WEBLATE_DEFAULT_FROM_EMAIL=weblate@blockstory.net
WEBLATE_ADMIN_NAME=*****
WEBLATE_SERVER_EMAIL=weblate@blockstory.net
WEBLATE_SITE_TITLE=Weblate
WEBLATE_EMAIL_PASSWORD=*****

you can reproduce the issue by clicking on this page: http://translate.blockstory.net/projects/cubica/item/

I can turn on DEBUG if that would help

paulpach commented 5 years ago

Notice in the log he posted there are 2 unrelated errors.
The first one is https://github.com/WeblateOrg/docker/issues/102 which can be resolved by deleting /app/data/celery/beat-schedule*

The second one is the time zone issue

paulpach commented 5 years ago

It started working on it's own.

nijel commented 5 years ago

I was thinking about updating dateutil, but I first wanted to confirm it's the issue. But the problem is that I can't reproduce it and it seems to be fixing without any action in most cases, what is really weird.

Anyway I've updated dateutil in https://github.com/WeblateOrg/docker/commit/2cddbdaaca8a6ae50eba2bf89614c67b099019b7

nijel commented 5 years ago

I've just pushed 3.3-2 containing this change, it would be great if somebody still experiencing this issue would test that.

sbidoul commented 5 years ago

@nijel the issue seems to be resolved with the latest docker image. Thanks!

nijel commented 5 years ago

Great, closing the issue as fixed.

msheiny commented 5 years ago

I'm still experiencing this issue using on image 3.3-4.

This was encountered while upgrading an instance (in steps) from 2.20 --> 3.3-4 . It occurred during the transition when I bumped to 3.2.2-5. I figured from there I saw this issue so I thought bumping to 3.3-4 would fix. Unfortunately still same error here. I'm running the docker-compose config with the 3.3-4 docker image backing it.

nijel commented 5 years ago

@msheiny what is the actual error message you get? What is your setting for WEBLATE_TIME_ZONE?

msheiny commented 5 years ago

Hi @nijel - WEBLATE_TIME_ZONE is set to "UTC" as an environment variable (running from docker-compose file).

Here's the traceback:

File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py" in inner 34. response = get_response(request) File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py" in _get_response 126. response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py" in _get_response 124. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python3.6/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func 44. response = view_func(request, *args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/weblate/trans/views/basic.py" in show_component 220. 'search_form': SearchForm(), File "/usr/local/lib/python3.6/dist-packages/weblate/trans/util.py" in render 236. return django_render(request, template, context, status=status) File "/usr/local/lib/python3.6/dist-packages/django/shortcuts.py" in render 36. content = loader.render_to_string(template_name, context, request, using=using) File "/usr/local/lib/python3.6/dist-packages/django/template/loader.py" in render_to_string 62. return template.render(context, request) File "/usr/local/lib/python3.6/dist-packages/django/template/backends/django.py" in render 61. return self.template.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render 171. return self._render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in _render 163. return self.nodelist.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render 937. bit = node.render_annotated(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render_annotated 904. return self.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/loader_tags.py" in render 150. return compiled_parent._render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in _render 163. return self.nodelist.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render 937. bit = node.render_annotated(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render_annotated 904. return self.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/loader_tags.py" in render 62. result = block.nodelist.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render 937. bit = node.render_annotated(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render_annotated 904. return self.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/loader_tags.py" in render 188. return template.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render 173. return self._render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in _render 163. return self.nodelist.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render 937. bit = node.render_annotated(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render_annotated 904. return self.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/defaulttags.py" in render 309. return nodelist.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render 937. bit = node.render_annotated(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render_annotated 904. return self.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/defaulttags.py" in render 512. return self.nodelist.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render 937. bit = node.render_annotated(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render_annotated 904. return self.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/loader_tags.py" in render 188. return template.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render 173. return self._render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in _render 163. return self.nodelist.render(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render 937. bit = node.render_annotated(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in render_annotated 904. return self.render(context) File "/usr/local/lib/python3.6/dist-packages/django/templatetags/i18n.py" in render 132. tmp_context[var] = val.resolve(context) File "/usr/local/lib/python3.6/dist-packages/django/template/base.py" in resolve 694. obj = template_localtime(obj, context.use_tz) File "/usr/local/lib/python3.6/dist-packages/django/utils/timezone.py" in template_localtime 177. not is_naive(value) and File "/usr/local/lib/python3.6/dist-packages/django/utils/timezone.py" in is_naive 255. return value.utcoffset() is None File "/usr/local/lib/python3.6/dist-packages/dateutil/tz/tz.py" in utcoffset 210. if self._isdst(dt): File "/usr/local/lib/python3.6/dist-packages/dateutil/tz/tz.py" in _isdst 275. if not self._hasdst: Exception Type: AttributeError at /projects/xxxxxxxxx/xxxxxxxxx/ Exception Value: 'tzlocal' object has no attribute '_hasdst'

Some other items pulled from the error (I stripped a lot out, let me know if you want additional debug information from me):

Internal Server Error: /projects/xxxxxxxxx/xxxxxxxxx/ AttributeError at /projects/xxxxxxxxx/xxxxxxxxx/ 'tzlocal' object has no attribute '_hasdst' Request Method: GET Request URL: https://xxxxxxxxxxxxxxxxxxxx/projects/xxxxxxxxx/xxxxxxxxx/ Django Version: 2.1.3 Python Executable: /usr/bin/uwsgi-core Python Version: 3.6.7 Python Path: ['/usr/local/lib/python3.6/dist-packages/', '.', '', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages', '/'] Server time: Wed, 16 Jan 2019 02:37:50 +0000 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin.apps.SimpleAdminConfig', 'django.contrib.admindocs', 'django.contrib.sitemaps', 'social_django', 'crispy_forms', 'compressor', 'rest_framework', 'rest_framework.authtoken', 'weblate.addons', 'weblate.auth', 'weblate.checks', 'weblate.formats', 'weblate.machinery', 'weblate.trans', 'weblate.lang', 'weblate.langdata', 'weblate.memory', 'weblate.screenshots', 'weblate.accounts', 'weblate.utils', 'weblate.vcs', 'weblate.wladmin', 'weblate', 'weblate.gitexport'] Installed Middleware: ['weblate.middleware.ProxyMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'weblate.accounts.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'social_django.middleware.SocialAuthExceptionMiddleware', 'weblate.accounts.middleware.RequireLoginMiddleware', 'weblate.middleware.SecurityMiddleware'] Traceback: Request information: USER: Weblate Admin GET: No GET data POST: No POST data FILES: No FILES data COOKIES: translate-tab = '#suggestions' django_language = 'en' META: CONTENT_LENGTH = '' CONTENT_TYPE = '' CSRF_COOKIE_USED = True DOCUMENT_ROOT = '/app/data/static' HTTP_ACCEPT = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' HTTP_ACCEPT_ENCODING = 'gzip' HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.5' HTTP_CACHE_CONTROL = 'max-age=0' HTTP_CDN_LOOP = 'cloudflare' HTTP_CF_IPCOUNTRY = 'US' HTTP_CF_VISITOR = '{"scheme":"https"}' HTTP_CONNECTION = 'close' HTTP_UPGRADE_INSECURE_REQUESTS = '1' HTTP_USER_AGENT = 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0' HTTP_X_FORWARDED_PROTO = 'https' QUERY_STRING = '' REMOTE_ADDR = '172.18.0.4' REMOTE_PORT = '40654' REQUEST_METHOD = 'GET' REQUEST_SCHEME = 'http' SCRIPT_NAME = '' SERVER_NAME = '' SERVER_PORT = '80' SERVER_PROTOCOL = 'HTTP/1.0' WEBLATE_LANGUAGE = '' WEBLATE_USER = "'msheiny'" WEBLATE_VERSION:Celery = '4.2.1' WEBLATE_VERSION:Django = '2.1.3' WEBLATE_VERSION:Git = '2.17.1' WEBLATE_VERSION:Mercurial = '4.5.3' WEBLATE_VERSION:Pillow = '5.1.0' WEBLATE_VERSION:PyYAML = '3.12' WEBLATE_VERSION:Python = '3.6.7' WEBLATE_VERSION:Weblate = '3.3' WEBLATE_VERSION:Whoosh = '2.7.4' WEBLATE_VERSION:celery-batches = '0.2' WEBLATE_VERSION:defusedxml = '0.5.0' WEBLATE_VERSION:django-appconf = '1.0.2' WEBLATE_VERSION:django-crispy-forms = '1.7.2' WEBLATE_VERSION:django_compressor = '2.2' WEBLATE_VERSION:djangorestframework = '3.9.0' WEBLATE_VERSION:git-svn = '2.17.1' WEBLATE_VERSION:jellyfish = '0.6.1' WEBLATE_VERSION:lxml = '4.2.1' WEBLATE_VERSION:python-dateutil = '2.7.5' WEBLATE_VERSION:pytz = '2018.7' WEBLATE_VERSION:pyuca = '1.2' WEBLATE_VERSION:six = '1.11.0' WEBLATE_VERSION:social-auth-app-django = '3.1.0' WEBLATE_VERSION:social-auth-core = '2.0.0' WEBLATE_VERSION:tesserocr = '2.3.1' WEBLATE_VERSION:translate-toolkit = '2.3.1' WEBLATE_VERSION:user-agents = '1.1.0' uwsgi.node = b'9e5da0fa0a2d' uwsgi.version = b'2.0.15-debian' wsgi.errors = <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'> wsgi.file_wrapper = '' wsgi.input = wsgi.multiprocess = True wsgi.multithread = False wsgi.run_once = False wsgi.url_scheme = 'https' wsgi.version = '(1, 0)' Settings: Using settings module weblate.settings TIME_FORMAT = 'P' TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] TIME_ZONE = 'UTC' TTF_PATH = '/usr/local/lib/python3.6/dist-packages/weblate/ttf'
nijel commented 5 years ago

Thanks, I think this has something to do with parsing vcs commit logs. Are you using git or something different? In case it's git, can you please provide me timestamps shown in git log --format=fuller --date=rfc -n1 in the repository for this project?

msheiny commented 5 years ago

@nijel - I am using git! Hrmm just for some context in this scenario I may have had to do some crazy rsync'ing to move some of the /app/data/ directories from my prod server to a staging server. The hostnames changed in this scenario.

Here's the output from the log you requested:

commit c2e8879731271068bc0c995a6c60380cf4393d76
Author:     robbpa <robbpaun@gmail.com>
AuthorDate: Wed, 16 Jan 2019 01:49:11 +0000
Commit:     Weblate <weblate@freedom.press>
CommitDate: Thu, 17 Jan 2019 02:25:19 +0000

    Translated using Weblate (Romanian)

    Currently translated at 100.0% (247 of 247 strings)

    Translation: SecureDrop/SecureDrop
    Translate-URL: https://weblate-sandbox.securedrop.org/projects/securedrop/securedrop/ro/

I noticed a few commits down though I have commits pointing to the old server:

commit 3f0cf3f55af25cc93fc31374c6a5c7f29be95050
Author:     Ettore Atalan <atalanttore@googlemail.com>
AuthorDate: Mon, 10 Dec 2018 17:37:26 +0000
Commit:     Weblate <weblate@freedom.press>
CommitDate: Fri, 14 Dec 2018 07:44:49 +0000

    Translated using Weblate (German)

    Currently translated at 100.0% (247 of 247 strings)

    Translation: SecureDrop/SecureDrop
    Translate-URL: https://weblate.securedrop.org/projects/securedrop/securedrop/de/
nijel commented 5 years ago

Thanks, however that is apparently not a problem, these parse just fine.

nijel commented 5 years ago

Thank you for your report, the issue you have reported has just been fixed. The problem is that the revision information is cached and thus the cache contains object from older dateutil which is not compatible with current one. I've fixed that by parsing the entries when loading from cache rather than before. The cache keys have been changed anyway in 2fbbc48efc5452fe21dbace3745406d3c8850510.

msheiny commented 5 years ago

Hey @nijel thanks so much for addressing a fix here and for the rapid response. :heart:

Do you have any recommendations for how to work-around this until 3.4 is released ? Can I clear this cache on my instance?

nijel commented 5 years ago

Yes, clearing the cache will help. The 3.4 should be out tomorrow though ;-).

msheiny commented 5 years ago

Greeeeeeat! Dumb question though .... how do I clear the cache for future reference? is that a management command ?

nijel commented 5 years ago

No, that one deletes translation memory. There is no command for clearing the cache. It is not existing for good reason - it can do harm.

Before continuing ensure nobody is actively using Weblate. Then wait until there are no unprocessed entries in the Celery queue (because that one will be deleted as well). You can check that on /api/metrics/ - watch for index_updates and celery_queue to be zero.

Then you can do it in the management shell (on docker you can execute that using docker-compose exec weblate weblate shell):

from django.core.cache import cache
cache.clear()