Hi Michal,
Thank you for the answer. I have posted an issue
https://github.com/WeblateOrg/weblate/issues/2370 on the github.
We have also bumped up our docker based Weblate to version 3.2.2-3 (version by
version from 3.2-1), however we got same error regarding celery during updates
from: 3.2.1-2 to 3.2.2-1, 3.2.2-1 to 3.2.2-2 and further to 3.2.2-3:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/celery/beat.py", line 515, in
_create_schedule
self._store[str('entries')]
File "/usr/lib/python3.5/shelve.py", line 113, in __getitem__
f = BytesIO(self.dict[key.encode(self.keyencoding)])
KeyError: b'entries'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/billiard/process.py", line 327,
in _bootstrap
self.run()
File "/usr/local/lib/python3.5/dist-packages/celery/beat.py", line 664, in run
self.service.start(embedded_process=True)
File "/usr/local/lib/python3.5/dist-packages/celery/beat.py", line 579, in
start
humanize_seconds(self.scheduler.max_interval))
File "/usr/local/lib/python3.5/dist-packages/kombu/utils/objects.py", line
44, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "/usr/local/lib/python3.5/dist-packages/celery/beat.py", line 623, in
scheduler
return self.get_scheduler()
File "/usr/local/lib/python3.5/dist-packages/celery/beat.py", line 618, in
get_scheduler
lazy=lazy,
File "/usr/local/lib/python3.5/dist-packages/celery/beat.py", line 458, in
__init__
Scheduler.__init__(self, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/celery/beat.py", line 225, in
__init__
self.setup_schedule()
File "/usr/local/lib/python3.5/dist-packages/celery/beat.py", line 486, in
setup_schedule
self._create_schedule()
File "/usr/local/lib/python3.5/dist-packages/celery/beat.py", line 519, in
_create_schedule
self._store[str('entries')] = {}
File "/usr/lib/python3.5/shelve.py", line 125, in __setitem__
self.dict[key.encode(self.keyencoding)] = f.getvalue()
_dbm.error: cannot add item to database
and it looks, that celery tasks probably aren't working at all + commit every 2
minutes as well isn't working. Can you help?
Pozdrawiam / Kind regards,
[Employee photo]
Łukasz "Max" Kokoszka
Senior Software Developer
SKYPE:
[email protected]<mailto:[email protected]>
LINKEDIN:
http://www.linkedin.com/in/lukaszmaxkokoszka/
[Future Processing]<http://www.future-processing.com>
+48 32 461 23 00<tel:>
www.future-processing.com<http://www.future-processing.com>
ul. Bojkowska 37A, 44-100 Gliwice, Poland
National Court Register No: 217147
I respect your time and privacy, so if you no longer wish to receive emails
from me, please let me know.
This e-mail and all files transmitted with it are confidential, may be subject
to copyright and are intended solely for the use of the individual or entity to
whom they are addressed. Any unauthorised dissemination or copying of this
email or its attachments, and any use or disclosure of any information
contained in them, is prohibited and may be illegal.
Otrzymany email, wraz z zawartymi w nim informacjami oraz załącznikami jest
poufny i może podlegać ochronie prawnej. Jeśli otrzymasz ten mail, jako
niezamierzony odbiorca, proszę poinformuj o tym fakcie nadawcę, a następnie
usuń mail ze swojego systemu. Wszelki nieautoryzowany użytek z zawartych w
mailu informacji bądź załączników jest zabroniony (m.in. ujawnianie,
kopiowanie, dalsza dystrybucja).
On 10/31/18 10:16 PM, Michal Čihař wrote:
Hi
On Wed, 2018-10-31 at 10:59 +0000, Łukasz Kokoszka via Weblate wrote:
Running "weblate commit_pending --all --age 0" gives even more errors
;)
ERROR Handled exception UnboundLocalError: b"local variable 'age'
referenced before assignment"
Traceback (most recent call last):
File "/usr/local/bin/weblate", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/weblate/runner.py",
line 34, in main
execute_from_command_line(argv)
File "/usr/local/lib/python3.5/dist-
packages/django/core/management/__init__.py", line 381, in
execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.5/dist-
packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.5/dist-
packages/django/core/management/base.py", line 316, in
run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.5/dist-
packages/weblate/trans/management/commands/__init__.py", line 42,
in execute
super(WeblateCommand, self).execute(*args, **options)
File "/usr/local/lib/python3.5/dist-
packages/django/core/management/base.py", line 353, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.5/dist-
packages/weblate/trans/management/commands/commit_pending.py", line
45, in handle
self.stdout.write if int(options['verbosity']) >= 1 else None,
File "/usr/local/lib/python3.5/dist-packages/celery/local.py",
line 191, in __call__
return self._get_current_object()(*a, **kw)
File "/usr/local/lib/python3.5/dist-packages/celery/app/task.py",
line 375, in __call__
return self.run(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-
packages/weblate/trans/tasks.py", line 93, in commit_pending
if last_change > age:
UnboundLocalError: local variable 'age' referenced before
assignment
This should be fixed here:
https://github.com/WeblateOrg/weblate/commit/accedf77b0a5289d829c60f083343ece5072779c
That's probably the reason why the Celery task is not working as
expected as it's using same code.
When it comes to your question why we aren't using newer version. So
in our tests version 3.2.1-1 and 3.2.1-2 were producing a lot of
ignored exceptions similar to this one:
Exception ignored in: <function
WeakValueDictionary.__init__.<locals>.remove at 0x7f55b6b5cea0>
Traceback (most recent call last):
File "/usr/lib/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: <function
WeakValueDictionary.__init__.<locals>.remove at 0x7f55b6b5cea0>
Traceback (most recent call last):
File "/usr/lib/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
This is bug in Python, should be harmless, see
https://bugs.python.org/issue29519
and we had some problems with migrations, however from current
perspective this (falling migrations) were our fault, and we will
give them a try one more time.
Versions: 3.2.2+ produced a lot of internal server errors during
simple clicking, and one especially huge problem for is the fact that
language management stopped working giving error:
list index out of range
Request Method: POST
Request URL: http://localhost/admin/lang/language/add/
Django Version: 2.1.2
Exception Type: IndexError
Exception Value:
list index out of range
Exception Location: /usr/local/lib/python3.5/dist-
packages/django/db/models/query.py in __getitem__, line 303
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.5.3
Python Path:
['/usr/local/lib/python3.5/dist-packages/',
'.',
'',
'/usr/lib/python35.zip',
'/usr/lib/python3.5',
'/usr/lib/python3.5/plat-x86_64-linux-gnu',
'/usr/lib/python3.5/lib-dynload',
'/usr/local/lib/python3.5/dist-packages',
'/usr/lib/python3/dist-packages',
'/']
Can you please open issue for that including full traceback? Thanks.
_______________________________________________
Weblate mailing list
[email protected]<mailto:[email protected]>
https://lists.cihar.com/cgi-bin/mailman/listinfo/weblate
_______________________________________________
Weblate mailing list
[email protected]
https://lists.cihar.com/cgi-bin/mailman/listinfo/weblate