translate / pootle

Online translation tool
http://pootle.translatehouse.org
GNU General Public License v3.0
1.49k stars 284 forks source link

Xapian 1.3.1 causes traceback in Pootle #6889

Open unho opened 5 years ago

unho commented 5 years ago

This was copied from https://github.com/translate/translate/issues/2973 because that ticket belongs to Pootle project.

The following error occurs when Xapian 1.3.1 is deployed in a virtualenv. I'm pretty sure it is an API change with 1.3.x

1.2.x is still considered the stable branch so I don't think is a critical requirement to fix just yet.

[Thu May 30 14:58:57 2013] [error] 2013-05-30 14:58:57,032 ERROR Error opening indexer for /en/phplist/:
[Thu May 30 14:58:57 2013] [error] in method 'new_Query', argument 1 of type 'std::string const &'
[Thu May 30 14:58:57 2013] [error] Traceback (most recent call last):
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/env/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
[Thu May 30 14:58:57 2013] [error]     response = callback(request, *callback_args, **callback_kwargs)
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/src/pootle/apps/pootle_misc/util.py", line 143, in wrapper
[Thu May 30 14:58:57 2013] [error]     return f(request, *args, **kwargs)
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/src/pootle/apps/pootle_store/views.py", line 99, in decorated_f
[Thu May 30 14:58:57 2013] [error]     return f(request, store, *args, **kwargs)
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/src/pootle/apps/pootle_store/views.py", line 600, in get_view_units_store
[Thu May 30 14:58:57 2013] [error]     return get_view_units(request, store.units, store=True, limit=limit)
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/src/pootle/apps/pootle_store/views.py", line 551, in get_view_units
[Thu May 30 14:58:57 2013] [error]     step_queryset = get_step_query(request, units_queryset)
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/src/pootle/apps/pootle_store/views.py", line 391, in get_step_query
[Thu May 30 14:58:57 2013] [error]     search_form, units_queryset)
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/src/pootle/apps/pootle_store/views.py", line 316, in get_search_step_query
[Thu May 30 14:58:57 2013] [error]     limitedquery = translation_project.indexer.make_query(searchparts, True)
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/env/src/translate-toolkit/translate/search/indexing/XapianIndexer.py", line 150, in make_query
[Thu May 30 14:58:57 2013] [error]     return super(XapianDatabase, self).make_query(*args, **kwargs)
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/env/src/translate-toolkit/translate/search/indexing/CommonIndexer.py", line 174, in make_query
[Thu May 30 14:58:57 2013] [error]     result.append(self._create_query_for_query(query))
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/env/src/translate-toolkit/translate/search/indexing/XapianIndexer.py", line 166, in _create_query_for_query
[Thu May 30 14:58:57 2013] [error]     return xapian.Query(query)
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/env/lib/python2.6/site-packages/xapian/__init__.py", line 7455, in _query_init
[Thu May 30 14:58:57 2013] [error]     __query_init_orig(self, *args)
[Thu May 30 14:58:57 2013] [error]   File "/var/www/sites/pootle-phplist/env/lib/python2.6/site-packages/xapian/__init__.py", line 1916, in __init__
[Thu May 30 14:58:57 2013] [error]     _xapian.Query_swiginit(self,_xapian.new_Query(*args))
[Thu May 30 14:58:57 2013] [error] TypeError: in method 'new_Query', argument 1 of type 'std::string const &'