Task #2478
Task #2476: Python 3 support
pythonwhois fails
100%
Associated revisions
Updating the libraries for Python 2+3 compatbility
Reference #2478
History
#1 Updated by Luke Murphey about 5 years ago
Traceback (most recent call last):
File "src/bin/network_tools_ops_rest_handler.py", line 41, in <module>
from network_tools_app import rest_handler
File "/Users/lmurphey/git/splunk-network-tools/src/bin/network_tools_app/__init__.py", line 32, in <module>
from network_tools_app.pythonwhois import get_whois
File "/Users/lmurphey/git/splunk-network-tools/src/bin/network_tools_app/pythonwhois/__init__.py", line 1, in <module>
from . import net, parse
File "/Users/lmurphey/git/splunk-network-tools/src/bin/network_tools_app/pythonwhois/parse.py", line 365, in <module>
registrant_regexes = [preprocess_regex(regex) for regex in registrant_regexes]
File "/Users/lmurphey/git/splunk-network-tools/src/bin/network_tools_app/pythonwhois/parse.py", line 365, in <listcomp>
registrant_regexes = [preprocess_regex(regex) for regex in registrant_regexes]
File "/Users/lmurphey/git/splunk-network-tools/src/bin/network_tools_app/pythonwhois/parse.py", line 207, in preprocess_regex
regex = re.sub(r"\\s\*\(\?P<([^>]+)>\.\+\)", r"\s*(?P<\1>\S.*)", regex)
File "/Users/lmurphey/Splunk/py3/lib/python3.7/re.py", line 192, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "/Users/lmurphey/Splunk/py3/lib/python3.7/re.py", line 309, in _subx
template = _compile_repl(template, pattern)
File "/Users/lmurphey/Splunk/py3/lib/python3.7/re.py", line 300, in _compile_repl
return sre_parse.parse_template(repl, pattern)
File "/Users/lmurphey/Splunk/py3/lib/python3.7/sre_parse.py", line 1024, in parse_template
raise s.error('bad escape %s' % this, len(this))
re.error: bad escape \s at position 0
#2 Updated by Luke Murphey about 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100