powerline-shell icon indicating copy to clipboard operation
powerline-shell copied to clipboard

Invalid Escape Sequence

Open KUPOinyourWINDOW opened this issue 1 year ago • 6 comments

Getting a weird error output at the bottom of every terminal just above the actual powerlineshell on Fedora 39

/usr/local/lib/python3.12/site-packages/powerline_shell-0.7.0-py3.12.egg/powerline_shell/init.py:14: SyntaxWarning: invalid escape sequence '`' /usr/local/lib/python3.12/site-packages/powerline_shell-0.7.0-py3.12.egg/powerline_shell/init.py:14: SyntaxWarning: invalid escape sequence '`' /usr/local/lib/python3.12/site-packages/powerline_shell-0.7.0-py3.12.egg/powerline_shell/segments/git.py:7: SyntaxWarning: invalid escape sequence '\S' /usr/local/lib/python3.12/site-packages/powerline_shell-0.7.0-py3.12.egg/powerline_shell/segments/git.py:7: SyntaxWarning: invalid escape sequence '.' /usr/local/lib/python3.12/site-packages/powerline_shell-0.7.0-py3.12.egg/powerline_shell/segments/git.py:7: SyntaxWarning: invalid escape sequence '\S' /usr/local/lib/python3.12/site-packages/powerline_shell-0.7.0-py3.12.egg/powerline_shell/segments/git.py:7: SyntaxWarning: invalid escape sequence '.'

KUPOinyourWINDOW avatar Sep 10 '23 18:09 KUPOinyourWINDOW

I have the same issue on Fedora 39, do you have any workarounds?

RenatGafarov avatar Dec 23 '23 14:12 RenatGafarov

I have the same issue on Fedora 39, do you have any workarounds?

I had the same issue with python3.12. I've gotten it to work without this error with python3.10 and 3.9.

mattjorg avatar Mar 08 '24 18:03 mattjorg

I have the same problem. Any possible solutions

timdave13 avatar Mar 18 '24 23:03 timdave13

Try this...

fix.patch

AlexHowansky avatar Apr 30 '24 18:04 AlexHowansky

Try this...

fix.patch

not sure how to use that, unfortunately

KUPOinyourWINDOW avatar May 14 '24 16:05 KUPOinyourWINDOW

This is a patch for the __init__.py file in the package. It changes two lines to be compatible with Python 3.12. The lines preceded with - are the old line and the lines preceded with + are the new lines. You could manually type in the changes (which is just adding a r in front of some strings) or use the patch utility to apply the patch for you:

cd powerline-shell
patch -p1 -N < /path/to/fix.patch

And then build as normal.

Alternatively, as this package appears to be no longer maintained, I have switched to Starship.

AlexHowansky avatar May 14 '24 17:05 AlexHowansky