Open Thorlogy opened 4 months ago
Please be more precise and send a screenshot of the generated source code (Source Code View) of line 12
here you go.
I tried the following code in the EdPy-IDE and it works:
import Ed
Ed.EdisonVersion = Ed.V1
Ed.DistanceUnits = Ed.TIME
Ed.Tempo = Ed.TEMPO_MEDIUM
#--------Your code below-----------
for x in range(10):
Ed.RightLed(Ed.ON)
Using this code in our source code editor, generates an error of the Edison compiler we are using:
Achtung
Das Programm kann nicht auf dem Roboter oder in der Simulation ausgeführt werden. Das Program kann nicht übersetzt werden. Die Fehlermeldung ist:
{"error": true, "messages": ["ERR: file:10:0: Syntax Error, FOR code too complex for Ed.Py"], "wavFilename": null}
A possible reason: our Edison compiler is outdated. BTW: the program can be executed in the simulation. We should change the error message.
The "old" (and origin) Edison Python compiler works, but unfortunately only with Python 2. That's why we changed it here to a python 3 compatible version. Seem like the issue with "too complex" comes from this compiler: https://github.com/thonny/thonny-edison One workaround would be, to switch back to the Python 2 version or trying to fix the thonny solution. Last year the information from Edison was, that they are not working on a Python 3 compatible compiler for Python.
Describe the bug
To Reproduce Steps to reproduce the behavior:
Expected behavior
Screenshots
Device information