There is a problem with python 3.8 and escape sequence:
See original GitHub issueThere is a problem with python 3.8 and escape sequence: 'invalid escape sequence \*
________________________ ERROR collecting test session _________________________
/opt/virtualenvs/py38/lib/python3.8/site-packages/py/_path/common.py:383: in visit
for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
/opt/virtualenvs/py38/lib/python3.8/site-packages/py/_path/common.py:435: in gen
for p in self.gen(subdir):
/opt/virtualenvs/py38/lib/python3.8/site-packages/py/_path/common.py:435: in gen
for p in self.gen(subdir):
/opt/virtualenvs/py38/lib/python3.8/site-packages/py/_path/common.py:424: in gen
dirs = self.optsort([p for p in entries
/opt/virtualenvs/py38/lib/python3.8/site-packages/py/_path/common.py:425: in <listcomp>
if p.check(dir=1) and (rec is None or rec(p))])
/opt/virtualenvs/py38/lib/python3.8/site-packages/_pytest/main.py:667: in _recurse
ihook = self.gethookproxy(dirpath)
/opt/virtualenvs/py38/lib/python3.8/site-packages/_pytest/main.py:482: in gethookproxy
my_conftestmodules = pm._getconftestmodules(fspath)
/opt/virtualenvs/py38/lib/python3.8/site-packages/_pytest/config/__init__.py:431: in _getconftestmodules
mod = self._importconftest(conftestpath.realpath())
/opt/virtualenvs/py38/lib/python3.8/site-packages/_pytest/config/__init__.py:470: in _importconftest
raise ConftestImportFailure(conftestpath, sys.exc_info())
E _pytest.config.ConftestImportFailure: (local('/conftest.py'), (<class 'SyntaxError'>, SyntaxError('invalid escape sequence \\*', ('/opt/virtualenvs/py38/lib/python3.8/site-packages/requests_oauthlib/oauth1_session.py', 258, 9, ' """Fetch a request token.\n')), <traceback object at 0x7fee844d6140>))
_Originally posted by @matejsp in https://github.com/requests/requests-oauthlib/issues/443#issuecomment-954664334_
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Mailman 3 What to do about invalid escape sequences
The thing that the python escape sequences is complaining about are never invalid (As was pointed out, it's complaining when a sequence of...
Read more >Escape sequences in Python strings - LWN.net
The main problem that warning for illegal escape sequences is trying to solve is for file names on Windows systems, where the backslash...
Read more >SyntaxError: invalid escape sequence · Issue #294 - GitHub
With Python 3.7 there is an issue with invalid escape characters (see error message below). from pyppeteer.us_keyboard_layout import keyDefinitions
Read more >invalid escape sequence" in Python? - Stack Overflow
If your backslash sequence does accidentally match one of Python's escape sequences, but you didn't mean it to, that's even worse.
Read more >Python Escape Characters - W3Schools
An escape character is a backslash \ followed by the character you want to insert. ... Try it Yourself ». To fix this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This doc string is flagged as a raw string, and that seems to be the fix for this warning. See stackoverflow link…
https://stackoverflow.com/questions/52335970/how-to-fix-string-deprecationwarning-invalid-escape-sequence-in-python
and more insight into this patch https://bugs.python.org/issue27364
I think we are safe to say that this issue has been covered.
Trying with sample test.py and current python that I use. It is not the same but similar behaviour.
test.py
pytest test.py