Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Escape Sequence #546

Open
KUPOinyourWINDOW opened this issue Sep 10, 2023 · 6 comments
Open

Invalid Escape Sequence #546

KUPOinyourWINDOW opened this issue Sep 10, 2023 · 6 comments

Comments

@KUPOinyourWINDOW
Copy link

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
Copy link

RenatGafarov commented Dec 23, 2023

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

@mattjorg
Copy link

mattjorg commented Mar 8, 2024

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
Copy link

I have the same problem. Any possible solutions

@AlexHowansky
Copy link

Try this...

fix.patch

@KUPOinyourWINDOW
Copy link
Author

Try this...

fix.patch

not sure how to use that, unfortunately

@AlexHowansky
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants