Is this an encoding problem?

I use another software to write python script and copy to Ignition.
Then Ignition prompt Red wavy line. I don’t know what’s going on.
Is this an encoding problem?
I use UTF-8 encoding now.

How do you do this? If it’s a file copy, try using UTF-8 without BOM (I suspect there is a BOM there that you can’t see.)
Also, clicking on the red marker on the right will tell you the error.

Very unlikely that it’s an encoding problem.

More likely, our syntax checker is looking for whitespace after the first #. When it doesn’t find whitespace, it’s flagging it as a problem even though it will run just fine.

Just typing it in doesn’t show an error, nor copy/paste when I was taking a quick look last night. It’s what made me think of the BOM possibility.

Thanks Jordan, just came here to say we tested it here as well and came to the same conclusion.

What threw me is this isn’t what I typically see with encoding issues, but an invisible character makes total sense.

1 Like

FWIW, y’all should check out python’s latest guidance for dealing with “Trojan Source” security issues:

More info here:

1 Like