I’m not sure how many of you people are using Komodo Edit (an open source version of Komodo IDE), but I have to try.
I’ve got a fresh install of the program and when I open a python file it shows me an “Syntax Warning: invalid escape sequence ‘\d’” at a random line. It is strange because the file has no single slash character anywhere. Has anyone faced this issue?
If you copy the one random line and make a minimal python file from it does that also get the error?
If so share the small example here as pre-formatted text for us to review.
I just pasted that text in a .py file and it ran just fine without any syntax errors on Windows. Is Komodo Edit saving the file in a strange encoding, which when Python reads as UTF-8 (or whatever is setup as its default), manages to mis-decode some characters as \d? Or vice-versa (is Komodo decoding UTF-8 as something else, and creating a spurious \d)?
Also, I can’t think why this would create a Syntax Error, but where’s result defined?
But note that there’s been no activity on that repository for years…
@FelixLeg, what version of Python are you using, and how are you running Komodo Edit?
I ask because the repository linked above states that the IDE uses Python 2.7. The SyntaxWarning you’re reporting is much newer than that–it started being a warning in Python 3.12.
If you’re running Komodo Edit by invoking Python directly and using 3.12 to do so, it is likely that the error is in the IDE itself, not in your code. Given that a whole lot of other stuff has changed since 2.7, I doubt it will work at all.