Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

SyntaxError: invalid escape sequence #294

Open
steven-81 opened this issue Feb 2, 2020 · 2 comments
Open

SyntaxError: invalid escape sequence #294

steven-81 opened this issue Feb 2, 2020 · 2 comments

Comments

@steven-81
Copy link

With Python 3.7 there is an issue with invalid escape characters (see error message below).

from pyppeteer.us_keyboard_layout import keyDefinitions
E File "/Users/xxxxx/.virtualenvs/xxxxxx/lib/python3.7/site-packages/pyppeteer/us_keyboard_layout.py", line 73
E 'Digit9': {'keyCode': 57, 'code': 'Digit9', 'shiftKey': '(', 'key': '9'},
E ^
E SyntaxError: invalid escape sequence (

Current work around is making a raw string.

@tirkarthi
Copy link

Some more invalid escape sequence warnings in Python 3.8

find . -iname '*.py'  | xargs -P 4 -I{} python3.8 -Wall -m py_compile {} 
./pyppeteer/us_keyboard_layout.py:73: DeprecationWarning: invalid escape sequence \(
  'Digit9': {'keyCode': 57, 'code': 'Digit9', 'shiftKey': '\(', 'key': '9'},
./pyppeteer/us_keyboard_layout.py:143: DeprecationWarning: invalid escape sequence \<
  'Comma': {'keyCode': 188, 'code': 'Comma', 'shiftKey': '\<', 'key': ','},
./pyppeteer/us_keyboard_layout.py:247: DeprecationWarning: invalid escape sequence \<
  '<': {'keyCode': 188, 'key': '\<', 'code': 'Comma'},

@Mattwmaster58
Copy link

Mattwmaster58 commented Feb 24, 2020

Hi @steven-81, it looks like this project has been abandoned. You may want to consider the active fork pyppeteer2. Feel free to create an issue there if your problem persists with the updated libary.

I know for a fact that us_keyboard_definitions.py has been updated in the fork, no idea when the update will land on PyPi though, and no idea if this issue has been fixed, I will take a look into it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants