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

Regex error #4

Open
Ajstroze opened this issue Feb 16, 2022 · 1 comment
Open

Regex error #4

Ajstroze opened this issue Feb 16, 2022 · 1 comment

Comments

@Ajstroze
Copy link

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\sre_parse.py", line 1039, in parse_template
this = chr(ESCAPES[this][1])
KeyError: '\s'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\run.py", line 3, in
import extract
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\extract.py", line 1, in
from lib.functions import *
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\lib\functions.py", line 9, in
import pythonwhois
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois_init_.py", line 1, in
from . import net, parse
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois\parse.py", line 365, in
registrant_regexes = [preprocess_regex(regex) for regex in registrant_regexes]
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois\parse.py", line 365, in
registrant_regexes = [preprocess_regex(regex) for regex in registrant_regexes]
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois\parse.py", line 207, in preprocess_regex
regex = re.sub(r"\s*(?P<([^>]+)>.+)", r"\s*(?P<\1>\S.*)", regex)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\re.py", line 210, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\re.py", line 327, in _subx
template = _compile_repl(template, pattern)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\re.py", line 318, in _compile_repl
return sre_parse.parse_template(repl, pattern)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\sre_parse.py", line 1042, in parse_template
raise s.error('bad escape %s' % this, len(this))
re.error: bad escape \s at position 0

This error is returned at run time

@chiachen-chang
Copy link

The code is not working

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

2 participants