Getting 'unexpected token ;' error message in Rhino Python editor but cannot identify cause

I have been getting the following error message in the Rhino Python editor recently. This has not happened before (as in this error only started cropping up when I tried to run the program today), and now I cannot identify what is causing the following error message.

 Message: unexpected token ';'

The editor says that the the line below is causing the error. I have already tried restarting Rhino, but the error persists.

# Sortal Library Imports
# Error happens in the this line of code
from sortal import (transformSet, rule, primitiveSort, point3D, point2D, coordinate, lineSegment3D,    planeSegment2D, lineSegment2D, line3D, label, weight, disjunctiveSort, attributeSort, affineTransform,  vector3D, vector2D, planeSegment3D)

# User-defined sort type imports from sort_types
from sort_types import sort_types

# Import for transformations
from mpmath import pi, sin, cos

In the editor, it looks like this. The error happens at line 24.

Is an indent or a white space possibly causing this error?

@Bianchi, why does line 26 start with “4#” ?

c.

I think the affecting ‘;’ (semicolon) could be in the sortal.py file…
What is the complete error message?

I think that was a mistake on my part when I was typing the code here. I’ve edited the code itself already since I spotted the ‘4’. Thanks for pointing it out.

I’ve managed to find where the semicolon is coming from, thanks for the idea!

1 Like