Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-unicode facet label crashes search-apps and how to repair this? #60

Open
MichaelGGeoda opened this issue Sep 25, 2019 · 7 comments
Open
Assignees

Comments

@MichaelGGeoda
Copy link

Hello,

Setting facet label to hebrew causes all search-apps to crush on ascii ecoding error. How can I repair the situation or how can I repair the labels back to English?

Thanks!

@opensemanticsearch
Copy link
Owner

opensemanticsearch commented Sep 25, 2019

If even the admin UI of django (where you can edit facets, not the open semantic search apps itself) fails, maybe you can change the label in the SQLite Database file directly by some sqlite tool. The database is in /var/lib/opensemanticsearch/db.sqlite3

Than change it in /etc/opensemanticsearch/facets too, so admin ui works again too.

Restart apache / Django as root by
service apache2 restart.

And than save an facet again, so /etc/opensemanticsearch/facets will be overwritten again by the config in database.

@opensemanticsearch
Copy link
Owner

Please can you send me more error message(s) to see on which functions it fails?

@MichaelGGeoda
Copy link
Author

Request Method: GET
https://oss.doxsense.com/search-apps/thesaurus/
1.11.11
UnicodeDecodeError
'ascii' codec can't decode byte 0xd7 in position 160: ordinal not in range(128)
/usr/lib/python3.6/encodings/ascii.py in decode, line 26
/usr/bin/python3
3.6.8
['/var/lib/opensemanticsearch', '/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', '/usr/lib/python3/dist-packages', '/usr/lib/python3/dist-packages/opensemanticetl', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/', '/', '/',
Request Method: GET
https://oss.doxsense.com/search-apps/datasources/
1.11.11
UnicodeDecodeError
'ascii' codec can't decode byte 0xd7 in position 160: ordinal not in range(128)
/usr/lib/python3.6/encodings/ascii.py in decode, line 26
/usr/bin/python3
3.6.8
['/var/lib/opensemanticsearch', '/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', '/usr/lib/python3/dist-packages', '/usr/lib/python3/dist-packages/opensemanticetl', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf',
Request Method: GET
https://oss.doxsense.com/search-apps/setup/
1.11.11
UnicodeDecodeError
'ascii' codec can't decode byte 0xd7 in position 160: ordinal not in range(128)
/usr/lib/python3.6/encodings/ascii.py in decode, line 26
/usr/bin/python3
3.6.8
['/var/lib/opensemanticsearch', '/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', '/usr/lib/python3/dist-packages', '/usr/lib/python3/dist-packages/opensemanticetl', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf', '/usr/local/lib/python3.6/dist-packages/odf',

@opensemanticsearch
Copy link
Owner

Plese first setup a password so not everybody can access/change your configs by Admin UI on the server.

Second please try to write following line as first line at begin of /etc/opensemanticsearch/facets and write me if it works after that (than i'll bugfix / add this automatically in next release):

# -*- coding: utf-8 -*-

(like you can see in the header of
https://github.com/opensemanticsearch/open-semantic-etl/blob/master/etc/opensemanticsearch/etl)

@opensemanticsearch
Copy link
Owner

After changing the line you need to restart apache2 with the django environment as root by
service apache2 restart

@opensemanticsearch
Copy link
Owner

Another idea (not knowing if implications to Python/Django) Is the linux system configured to an UTF8 charset or old ASCII?

@MichaelGGeoda
Copy link
Author

The linux system supports Hebrew. The OpenSemanticSearch also supports hebrew in docs content. The problem are facets etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants