will8211 / unimatrix

Python script to simulate the display from "The Matrix" in terminal. Uses half-width katakana unicode characters by default, but can use custom character sets. Accepts keyboard controls while running. Based on CMatrix.
GNU General Public License v3.0
1.7k stars 158 forks source link

Invalid Escape Sequence #56

Open EvilJordan opened 6 months ago

EvilJordan commented 6 months ago

Not sure if this matters (because it still seems to run well), but when running, this is dumped to the terminal:

/usr/local/bin/unimatrix:32: SyntaxWarning: invalid escape sequence '\;'
  help_msg = '''
/usr/local/bin/unimatrix:231: SyntaxWarning: invalid escape sequence '\;'
  '`-=~!@#$%^&*()_+[]{}|\;\':",./<>?"',
/usr/local/bin/unimatrix:237: SyntaxWarning: invalid escape sequence '\;'
  'S': '`-=~!@#$%^&*()_+[]{}|\;\':",./<>?"',
midekra commented 5 months ago

check that you're not running an older version of unimatrix. I had the same error until I noticed I had installed it twice, the latest was through pipx, which was the correct version without any error.

EDIT: it seems the error occurs due to the version of python (3.11 runs correctly for me)

heit0r commented 1 month ago

I'm also having the same issue:

/usr/bin/unimatrix:32: SyntaxWarning: invalid escape sequence '\;'
  help_msg = '''
/usr/bin/unimatrix:231: SyntaxWarning: invalid escape sequence '\;'
  '`-=~!@#$%^&*()_+[]{}|\;\':",./<>?"',
/usr/bin/unimatrix:237: SyntaxWarning: invalid escape sequence '\;'
  'S': '`-=~!@#$%^&*()_+[]{}|\;\':",./<>?"',
virtadpt commented 1 month ago

I ran into this with another application running under Python v3.12.x. Removing the backslash escaping the character should fix it.

will8211 commented 1 month ago

Should be fixed here: https://github.com/will8211/unimatrix/pull/60