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

[Python] NameError: global name 'symbols' is not defined #12

Open
chetanborse007 opened this issue Nov 20, 2016 · 0 comments
Open

[Python] NameError: global name 'symbols' is not defined #12

chetanborse007 opened this issue Nov 20, 2016 · 0 comments

Comments

@chetanborse007
Copy link

hfst-optimized-lookup-python package fails with below error, when it does not find symbol number:

Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hfst_lookup-1.0-py2.7.egg/hfst_lookup//hfst_lookup.py", line 57, in
if word.isalpha() and transducer.analyze(word):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hfst_lookup-1.0-py2.7.egg/hfst_lookup/transducer.py", line 162, in analyze
self.inputString.s.append(self.letterTrie.findKey(inputline))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hfst_lookup-1.0-py2.7.egg/hfst_lookup/shared.py", line 120, in findKey
return self.root.find(indexstring)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hfst_lookup-1.0-py2.7.egg/hfst_lookup/shared.py", line 107, in find
if not (current in symbols):
NameError: global name 'symbols' is not defined

This issue has a simple fix.
Replace 'symbols' with 'self.symbols'

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

No branches or pull requests

0 participants