Hi

On Wed, 2018-10-31 at 22:16 +0100, Michal Čihař wrote:
> 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

I've just pushed updated docker container which should address both of
the above issues. It's now available as weblate:edge, testing is
welcome :-).

-- 
        Michal Čihař | https://cihar.com/ | https://weblate.org/

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Weblate mailing list
[email protected]
https://lists.cihar.com/cgi-bin/mailman/listinfo/weblate

Reply via email to