b-ryan / powerline-shell

A beautiful and useful prompt for your shell
MIT License
6.21k stars 746 forks source link

Invalid Escape Sequence #546

Open KUPOinyourWINDOW opened 1 year ago

KUPOinyourWINDOW commented 1 year ago

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 '.'

RenatGafarov commented 9 months ago

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

mattjorg commented 7 months ago

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.

timdave13 commented 7 months ago

I have the same problem. Any possible solutions

AlexHowansky commented 5 months ago

Try this...

fix.patch

KUPOinyourWINDOW commented 5 months ago

Try this...

fix.patch

not sure how to use that, unfortunately

AlexHowansky commented 5 months ago

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.