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

/perword issue #111

Open
sevilaybayatli opened this issue Jun 17, 2018 · 0 comments
Open

/perword issue #111

sevilaybayatli opened this issue Jun 17, 2018 · 0 comments
Labels

Comments

@sevilaybayatli
Copy link
Member

hi,
I followed the instructions in this site to install and work with apertium-apy :http://wiki.apertium.org/wiki/Apertium-apy

sevilay@sevilay-linux:~/engine-code/apertium-apy$ ./servlet.py -p 8080 /home/sevilay/engine-code/
[W 180617 15:57:19 apy:324] Unable to import CLD2, continuing using naive method of language detection
[I 180617 15:57:19 apy:117] 3 generator modes found
[I 180617 15:57:19 apy:117] 1 tokenise modes found
[I 180617 15:57:19 apy:117] 1 spell modes found
[I 180617 15:57:19 apy:117] 2 pair modes found
[I 180617 15:57:19 apy:117] 4 analyzer modes found
[I 180617 15:57:19 apy:117] 4 tagger modes found
[I 180617 15:57:19 apy:348] Serving at http://localhost:8080
[I 180617 15:57:19 systemd:116] No notification socket, not launched via systemd?

all commands worked without any error for example:

curl 'http://localhost:8080/translate?langpair=kaz|tur&q=Сен+бардың+ба?'
{"responseDetails": null, "responseData": {"translatedText": "Sen gittin m\u0131?"}, "responseStatus": 200}sevilay@sevilay-linux:~/engine-code/apertium-apy$

but when I try command of /perword I get this error for example:
curl 'http://localhost:8080/perWord?lang=kaz-tur&modes=morph+biltrans&q=Сен+бардың+ба?'

Error:

Exception in thread Thread-4:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/home/sevilay/engine-code/apertium-apy/apertium_apy/handlers/per_word.py", line 36, in process_per_word
morph_lexical_units = remove_dot_from_deformat(query, re.findall(lexical_unit_re, analysis))
File "/usr/lib/python3.5/re.py", line 213, in findall
return _compile(pattern, flags).findall(string)
TypeError: expected string or bytes-like object
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/home/sevilay/engine-code/apertium-apy/apertium_apy/handlers/per_word.py", line 141, in worker
callback(result.get(timeout=self.timeout))
File "/usr/lib/python3.5/multiprocessing/pool.py", line 608, in get
raise self._value
TypeError: expected string or bytes-like object

please can you help me to solve this problem ?

@sushain97 sushain97 added the bug label Jun 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants