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

SyntaxWarning: invalid escape sequence #168

Open
koliyo opened this issue Dec 19, 2023 · 2 comments
Open

SyntaxWarning: invalid escape sequence #168

koliyo opened this issue Dec 19, 2023 · 2 comments

Comments

@koliyo
Copy link

koliyo commented Dec 19, 2023

Getting these warnings with python 3.12

/Users/nils/Library/Caches/pypoetry/virtualenvs/vrex-cli-9LieaW4p-py3.12/lib/python3.12/site-packages/fastcore/script.py:32: SyntaxWarning: invalid escape sequence '\.'
  x = re.sub("(enum |class|function|__main__\.|\ at.*)", '', x)
/Users/nils/Library/Caches/pypoetry/virtualenvs/vrex-cli-9LieaW4p-py3.12/lib/python3.12/site-packages/fastcore/script.py:33: SyntaxWarning: invalid escape sequence '\ '
  x = re.sub("(<|>|'|\ )", '', x) # spl characters
/Users/nils/Library/Caches/pypoetry/virtualenvs/vrex-cli-9LieaW4p-py3.12/lib/python3.12/site-packages/fastcore/docments.py:62: SyntaxWarning: invalid escape sequence '\s'
  _clean_re = re.compile('^\s*#(.*)\s*$')
@samoilovartem
Copy link

+1 Same here with Python 3.12

@mohitmishra786
Copy link

Hello @koliyo ,

Can you firstly check whether if you are using an updated version of the fastcore library. If the issue still persists please try using

import warnings
warnings.filterwarnings("ignore", category=SyntaxWarning, module="fastcore")

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

3 participants