You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
Exception occurs when tring to eval Python code #53
OS: Manjaro Linux
Default Python version: 3.5.2
LT installed from AUR (package lighttable-git)
I created a file test.py with the following code:
print(2+2);
And then tried to eval it with Ctrl+Shift+Enter, which resulted in the exception below:
Traceback (most recent call last):
File "/usr/lib/lighttable/resources/app/plugins/Python/py-src/ltmain.py", line 193, in handleEval
code= compile(ensureUtf(code), ensureUtf(data[2]["name"]), 'eval')
File "/usr/lib/lighttable/resources/app/plugins/Python/py-src/ltmain.py", line 50, in ensureUtf
if type(s) == unicode:
NameError: name 'unicode' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/lighttable/resources/app/plugins/Python/py-src/ltmain.py", line 197, in handleEval
code= compile(ensureUtf(code), ensureUtf(data[2]["name"]), 'exec')
File "/usr/lib/lighttable/resources/app/plugins/Python/py-src/ltmain.py", line 50, in ensureUtf
if type(s) == unicode:
NameError: name 'unicode' is not defined
Unfortunately, the Python plugin is lacking an active maintainer, let alone people to review pull requests.
Since none of the current Light Table maintainers use Python this plugin has not had much love. We need people from the community to either become maintainers of the plugin, or verify pull requests are acceptable by testing them out. Otherwise the open pull requests will continue to languish.
If anyone is interested, please feel free to get in touch with a member of the Light Table team.
That NameError looks like the code base was written for an older version of Python (2.x) and doesn't work on Python 3.5.
Converting the whole code base to be compatible with Python 3.x may be easy or a large and difficult task. Hard to know without looking inside. There are libraries and tools to ease the process.
Activity
hckr commentedon Jan 10, 2017
PR #39 should solve the problem. Why don't you merge it?
sbauer322 commentedon Jan 11, 2017
Unfortunately, the Python plugin is lacking an active maintainer, let alone people to review pull requests.
Since none of the current Light Table maintainers use Python this plugin has not had much love. We need people from the community to either become maintainers of the plugin, or verify pull requests are acceptable by testing them out. Otherwise the open pull requests will continue to languish.
If anyone is interested, please feel free to get in touch with a member of the Light Table team.
Almenon commentedon Jul 11, 2017
had same issue with Windows 10
VasilGrdzelishvili commentedon Sep 6, 2021
had same issue with Windows 10 too..

at first time when I run code it's work but after that there are same problem
akaihola commentedon Sep 7, 2021
That
NameErrorlooks like the code base was written for an older version of Python (2.x) and doesn't work on Python 3.5.Converting the whole code base to be compatible with Python 3.x may be easy or a large and difficult task. Hard to know without looking inside. There are libraries and tools to ease the process.