Error (CS1009): Unrecognized escape sequence

I am trying to compile a simple GH script with a python component inside to a plugin. I am getting this error. Any idea what this means?


19 Curve to Plots with curvature check python.gh (7.6 KB)

@stevebaer please help :pray:

string _definitionName = "d:\xxxxx\Downloads\19 Curve to Plots with curvature check python.gh";

The source code includes script file location reference, unescaped. Has steve fixed this in newer versions?

Meanwhile you can escape the string manually.

1 Like

I put them in the same folder so no escape will be required. That solved the issue.

1 Like

I suppose that’s the intended usage.

It could be better if RSC can raise a warning when definition file is in another directory, etc.

hi guys
i have a similiar error in the line 59

could someone please point out the error and how to solve it?

thanks

Hi, I encountered the same error trying to compile a GH definition into RHP.
What do you mean by saying you put them together into the same folder?
Thanks!

I use R7, not python script inside the GH.

I don’t think it was properly answered. You can’t provide a path with single backslashes here. Because …\Temp… for instance will mean <tab>emp . You either use forward slashes or two backslashes
to specify a path ->…Local/Temp… or …Local\\Temp…

More important here. This is quite fundamental coding knowledge. In general, you should always try to understand the error message, and always try to google it. Microsoft puts lots of effort in explaining their error codes (in this case CS1009)

I got it.
You just need to put the project in the same folder as Grasshopper definition.