8000 Invalid escape sequences in python3.py · Issue #220 · gpoore/pythontex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Invalid escape sequences in python3.py #220
Open
@AndrewSwann

Description

@AndrewSwann

When compiling a file with pythontex I get messages about invalid escape sequences in python3.py. I am running the latest version from texlive. The output of pythontex --version gives

/usr/local/texlive/2023/texmf-dist/scripts/pythontex/pythontex3.py:549: SyntaxWarning: invalid escape sequence '\s'
  msg = '''
/usr/local/texlive/2023/texmf-dist/scripts/pythontex/pythontex3.py:1810: SyntaxWarning: invalid escape sequence '\s'
  errgobble = match('(\s*)', line).groups()[0]
/usr/local/texlive/2023/texmf-dist/scripts/pythontex/pythontex3.py:2075: SyntaxWarning: invalid escape sequence '\s'
  errgobble = match('(\s*)', line).groups()[0]
PythonTeX 0.18

which already contains the errors.

The first instance should replace "\setpythontexworkingdir{<outputdir>}". by "\\setpythontexworkingdir{<outputdir>}". in the subsequent string.
The other two cases should probably replace '(\s*)' by a raw string r'(\s*)'.

I don't have experience of making changes on github, and have not be able to run pythontex in a way that uses a modified local version of python3.py, so have not be able to test these changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0