Xirider / LiveCode

Real-time python variable evaluation
MIT License
14 stars 2 forks source link

SyntaxError: invalid syntax in AREPL #1

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi @Xirider, I just installed your extension, but when I run it, I seem to be getting an error from within the internals of the extension. I am getting the following error:

File "xirider.livecode-1.3.10/node_modules/arepl-backend/python/arepl_python_evaluator.py", line 43
    userError: str,
             ^
SyntaxError: invalid syntax

I also get the following error on top of that:

internal livecode error: Error stack: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at doWrite (_stream_writable.js:414:19)
    at writeOrBuffer (_stream_writable.js:402:5)
    at Socket.Writable.write (_stream_writable.js:302:11)
    at PythonShell.send (/home/anon/.vscode/extensions/xirider.livecode-1.3.10/node_modules/python-shell/index.js:285:20)
    at PythonEvaluator.execCode (/home/anon/.vscode/extensions/xirider.livecode-1.3.10/node_modules/arepl-backend/index.js:62:22)
    at ToAREPLLogic.onUserInput (/home/anon/.vscode/extensions/xirider.livecode-1.3.10/out/src/toAREPLLogic.js:79:34)
    at PreviewManager.onAnyDocChange (/home/anon/.vscode/extensions/xirider.livecode-1.3.10/out/src/PreviewManager.js:337:54)
    at listOnTimeout (internal/timers.js:533:17)
    at processTimers (internal/timers.js:475:7)

I'm not sure what's going on here, but I thought I'd point it out.

My Specs

Component Version
OS Ubuntu 20.04
Architecture x86_64
VSCode 1.46.1
LiveCode 1.3.10
Python 3.8.3

Note: In the first error, I removed the first part of the path to make it shorter. It's actually /home/applemonkey496/.vscode/extensions/...

Xirider commented 4 years ago

Hi @applemonkey496 , thanks for the report! This can happen if LiveCode can't find your python path:

Please try to set livecode.pythonPath in the settings to your python 3 installation.

I hope that helps.

ghost commented 4 years ago

It works now, thanks!

NOBB2333 commented 3 years ago

@applemonkey496 sir ,may i ask how did u do that ,i can't find any to change ,oh ,maybe because i used no good ,can u describe that how to do ,what kind code id need by the way ,i am mac m1,always told me verson 2.7 thanks
your hangzhou friend