Closed pc-jedi closed 8 years ago
It seems like whoosh is having some troubles with the index. Was it created with Python 3 or it was migrated from Python 2?
The whole environment was created with Python 3.
Looks like Whoosh bug, I've filed it there: https://bitbucket.org/mchaput/whoosh/issues/441/unicodedecodeerror-on-search
https://gist.github.com/Mikanoshi/0e751ef3a496ebd340dcaa43362abdeb Never used Python 3. Character is horizontal ellipsis … Will updating to 2.6 help? I'm on 2.5-dev
Okay, this was fixed in d9da8a438ed06facc6ac32025bf5dc7d5e073ba3, see #996
I've Python 2.7 and weblate-2.6 checked out, but I have the same problem:
@nijel , here is my log when I'm trying to execute ./manage.py loadpo --all
and it finds new locale:
INFO project/prod/zh_TW: processing resources/lang/i18n/zh_TW/LC_MESSAGES/messages.po, revision has changed
Traceback (most recent call last):
File "./manage.py", line 31, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 345, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 399, in execute
output = self.handle(*args, **options)
File "/opt/weblate/weblate/trans/management/commands/loadpo.py", line 42, in handle
subproject.create_translations(options['force'], langs)
File "/opt/weblate/weblate/trans/models/subproject.py", line 1002, in create_translations
self, lang, code, path, force, request=request
File "/opt/weblate/weblate/trans/models/translation.py", line 70, in check_sync
translation.check_sync(force, request=request)
File "/opt/weblate/weblate/trans/models/translation.py", line 461, in check_sync
self, unit, pos
File "/opt/weblate/weblate/trans/models/unit.py", line 107, in update_from_unit
dbunit.update_from_unit(unit, pos, created)
File "/opt/weblate/weblate/trans/models/unit.py", line 486, in update_from_unit
same_state=same_state
File "/opt/weblate/weblate/trans/models/unit.py", line 748, in save
super(Unit, self).save(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 708, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 736, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 820, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 859, in _do_insert
using=using, raw=raw)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 122, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 1039, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 1060, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 112, in execute
return self.cursor.execute(query, args)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 207, in execute
args = tuple(map(db.literal, args))
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 304, in literal
s = self.escape(o, self.encoders)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 215, in string_literal
return db.string_literal(obj)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
$ ./manage.py list_versions:
* Weblate weblate-2.6
* Python 2.7.11+
* Django 1.9.5
* six 1.10.0
* python-social-auth 0.2.18
* Translate Toolkit 1.14.0-rc1
* Whoosh 2.7.4
* Git 2.7.4
* Pillow (PIL) 1.1.7
* dateutil 2.5.3
* lxml 3.6.0
* django-crispy-forms 1.6.0
* compressor 1.6
* djangorestframework 3.3.3
* pytz 2016.4
* pyuca N/A
* pyLibravatar N/A
* Mercurial 3.7.3
* Database backends: django.db.backends.mysql
@ihoru Can you please open separate issue for it? This is already third different problem in this bug...
@nijel, new issue created: https://github.com/nijel/weblate/issues/1106
Steps to reproduce
I'm not sure what exactly the user did. But as far as I understand the trancelog he was searching for something.
Actual behaviour
Server configuration