Runpythonscript error bug rhino 8.14

Hi, my script runs fine in the script editor but using runpythonscript this is what I get

For some reason, the script editor accepts f-strings and _RunPythonScript does not. As a workaround, you can use "page {}".format(i+1+NUM) instead of f"page {i+1+NUM}".

Running this snippet on my machine shows the script editor using python version 3.9.10 while _RunPythonScript uses version 2.7.12.

import platform
print(platform.python_version())

Works great man thanks alot, didn’t know runpythonscript and script editor had different python versions

It looks like the script editor can use either Python 2 or Python 3 and you specify which when you create a new script. Also, runpythonscript can be coerced to use Python 3 by including #! python3 at the top of your file.

1 Like