linuxscout / mishkal

Mishkal is an arabic text vocalization software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

global name 'word' is not defined

HaraldBerthelsen opened this issue · comments

Hi,
when I cloned mishkal today there was a small error when running python interfaces/web/mishkal-webserver.py and calling it from a client. (I haven't updated in a long time..)

The error was easily resolved by changing "word" to "voc_word" in line 385 in tashkeel.py, but I thought you would want to know.
Thanks for the great work!

Here's the stacktrace:

exception happened during processing of request from ('127.0.0.1', 47444)
Traceback (most recent call last):
File "interfaces/web/./lib/paste/httpserver.py", line 1062, in process_request_in_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 652, in init
self.handle()
File "interfaces/web/./lib/paste/httpserver.py", line 436, in handle
BaseHTTPRequestHandler.handle(self)
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "interfaces/web/./lib/paste/httpserver.py", line 431, in handle_one_request
self.wsgi_execute()
File "interfaces/web/./lib/paste/httpserver.py", line 287, in wsgi_execute
self.wsgi_start_response)
File "interfaces/web/./lib/okasha2/baseWebApp.py", line 445, in call
try: r=f(rq, *a)
File "interfaces/web/./lib/okasha2/baseWebApp.py", line 236, in wrapper
r=self._template(rq, func(*args), *self._templateArgs, **self._templateKw)
File "/media/bigdisk/git/mishkal/interfaces/web/adawaty.py", line 125, in ajaxGet
resulttext=core.adaat.DoAction(text,action, options)
File "interfaces/web/../../core/adaat.py", line 40, in DoAction
return tashkeel2(text, lastmark)
File "interfaces/web/../../core/adaat.py", line 679, in tashkeel2
vocalized_dict = vocalizer.tashkeel_ouput_html_suggest(text)
File "interfaces/web/../../mishkal/tashkeel/tashkeel.py", line 413, in tashkeel_ouput_html_suggest
return self.tashkeel(text, suggestion = True, format_display = "html")
File "interfaces/web/../../mishkal/tashkeel/tashkeel.py", line 385, in tashkeel
vocalized_text = u" ".join([vocalized_text, self.display(word, format_display)])
NameError: global name 'word' is not defined

Thanks a lot,
I will fix it.