ZeroNet fails to start.
SyntaxError: unqualified exec is not allowed in function 'bench' it is a nested function (UiRequest.py, line 645)
Looking for similar errors, looks like it might be related to a bug that was fixed in Python 2.7.9. Maybe try updating it?
I'm not sure what the fix was for the config thing, but that went away eventually. The other error had an issue with this line in /src/ui/uirequest.py
exec(init, globals(), locals())
I changed it to:
exec init in globals(), locals()
And it worked fine. Is it due to an older python version? I'll have to look into updating.
My ZeroNet on Windows is running off of Python 2.7.9(pure coincidence) and didn't encounter this. So it probably is related to that old bug I mentioned.
@April93 Weird, that exec init in globals(), locals() is Python3-style.
Here's the stackoverflow page I read on how to 'fix' the problem. No idea what's going on tbh.
PR: #1253.
I tried updating to python 2.7.14 and it works fine without the fix.
Yeah, looks like this was a bug in Python <=2.7.8, which was fixed in 2.7.9.
This answer on that Stackoverflow page you linked explains it.
Thanks for reporting. I switched to eval from exec: https://github.com/HelloZeroNet/ZeroNet/commit/0c6c7d27252f01cddbc8cc7109082f6a72afb7d7#diff-7fa31802ec08bb55f5128c3e841b5f34R645
Can you please verify if it's fixed the problem?
You have to save https://raw.githubusercontent.com/HelloZeroNet/ZeroNet/0c6c7d27252f01cddbc8cc7109082f6a72afb7d7/src/Ui/UiRequest.py to Users/Kafke/Downloads/ZeroNet-master/src/Ui directory
Unfortunately as I mentioned, I already updated my python version. I'm unsure of how to downgrade.
I just tested it with python 2.6.x and it works (the exec code drops the same error as you described), so I suppose it will work with 2.7.6
Most helpful comment
I just tested it with python 2.6.x and it works (the exec code drops the same error as you described), so I suppose it will work with 2.7.6