Skip to content

SyntaxWarning: invalid escape sequence with python 3.13 #131

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

Open
yherve opened this issue May 22, 2025 · 0 comments
Open

SyntaxWarning: invalid escape sequence with python 3.13 #131

yherve opened this issue May 22, 2025 · 0 comments

Comments

@yherve
Copy link

yherve commented May 22, 2025

Hi. First of all, thanks for sharing this library, it is great.

With python 3.13 I have these warnings:

/data/repo/sdwaas/smcaas-infra/src/smcaas-cli/.venv/lib/python3.13/site-packages/table2ascii/exceptions.py:37: SyntaxWarning: invalid escape sequence '\ '
  """Exception raised when the number of columns in the footer
/data/repo/sdwaas/smcaas-infra/src/smcaas-cli/.venv/lib/python3.13/site-packages/table2ascii/exceptions.py:61: SyntaxWarning: invalid escape sequence '\ '
  """Exception raised when the number of columns in the body
/data/repo/sdwaas/smcaas-infra/src/smcaas-cli/.venv/lib/python3.13/site-packages/table2ascii/exceptions.py:90: SyntaxWarning: invalid escape sequence '\ '
  """Exception raised when the number of alignments does not match
/data/repo/sdwaas/smcaas-infra/src/smcaas-cli/.venv/lib/python3.13/site-packages/table2ascii/exceptions.py:114: SyntaxWarning: invalid escape sequence '\ '
  """Exception raised when the number of column widths does not match

the fix is easy, just remove or use double backslash

Note: in the meantime, here is how to ignore these warnings:

    import warnings
    warnings.filterwarnings("ignore")
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

1 participant