Open azazel912 opened 5 months ago
me to!
I have same problem.
same here, find any solution?
@Xirider, hey, this issue is still unresolved and it really needs to be fixed, thank you.
go to the given path and edit init.py change line 3 to: from io import StringIO change all cStringIO to StringIO
go to the given path and edit init.py change line 3 to: from io import StringIO change all cStringIO to StringIO
no use
go to the given path and edit init.py change line 3 to: from io import StringIO change all cStringIO to StringIO
no use
for me print statement and error message is working but it still wont show variables
go to the given path and edit init.py change line 3 to: from io import StringIO change all cStringIO to StringIO
Works for me
Same issue, changing cstring to string doesn't work
The issue appears to be in the python-astunparse module rather than the Live Code extension itself (or the python-six
module). Perhaps this issue needs to be reported there?
go to the given path and edit init.py change line 3 to: from io import StringIO change all cStringIO to StringIO
I do not like the idea of editing 3rd-Party source files directly, my feeling is that it should be fixed at source for everyone.
However since the issue seems to originate "upstream" I have tried this solution and it does work for me. Although I would appreciate clarification -- Answer's with explanations are always best ;) i.e. What is the cause of the problem and why does this action solve it?
The python-six module is a compatibility layer between Python 2.x and Python 3.x, wherein the six.moves module is used to 'provide a consistent interface' for certain functions that have been relocated to different modules in Python 3.x.
So all we're doing is changing the import statement to refer to the standard io module rather than reference one via six (where I assume "cStringIO" refers to a pre-compiled module's static source file in C), then simply updating the references.
I do not know how dependent on or how closely tied to these external modules the Live Code extension is, however some investigating on my part seems to suggest that since Python 3.9 the astunparse
module may no longer be required as equivalent functionality is now included in the standard library.
Some sort of "official" clarification on this issue would be much appreciated.
While you're waiting for Xirider to fix this, you could use https://github.com/Almenon/AREPL-vscode as an alterative. It's a VSCode extension similar to LiveCode (the codebase was forked from AREPL-vscode, actually). AREPL-vscode does not have this problem as it does not use astunparse.
While you're waiting for Xirider to fix this, you could use https://github.com/Almenon/AREPL-vscode as an alterative. It's a VSCode extension similar to LiveCode (the codebase was forked from AREPL-vscode, actually). AREPL-vscode does not have this problem as it does not use astunparse.
Awesome tip!!! It works very well.
Hello, I encountered an error that does not allow me to open the live code, after I run it I see this text Print Output: Traceback (most recent call last): File "c:\Users\leandre.vscode\extensions\xirider.livecode-1.3.10\node_modules\arepl-backend\python\arepl_python_evaluator.py", line 11, in import astunparse File "c:\Users\leandre.vscode\extensions\xirider.livecode-1.3.10\node_modules\arepl-backend\python\astunparseinit.py", line 3, in from six.moves import cStringIO ModuleNotFoundError: No module named 'six.moves' I tried to somehow solve this problem or find a solution on the Internet but it didn’t help, please help me with my problem, thanks in advance