-
Notifications
You must be signed in to change notification settings - Fork 556
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
running python Drain_demo.py , An error occurred #98
Comments
xpai
pushed a commit
that referenced
this issue
Sep 5, 2023
xpai
pushed a commit
that referenced
this issue
Sep 5, 2023
xpai
pushed a commit
that referenced
this issue
Sep 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(base) ➜ demo git:(master) ✗ python Drain_demo.py
Parsing file: ../logs/HDFS/HDFS_2k.log
Processed 50.0% of log lines.
Processed 100.0% of log lines.
Traceback (most recent call last):
File "/environment/miniconda3/lib/python3.8/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 "Drain_demo.py", line 20, in
parser.parse(log_file)
File "/home/featurize/logparser/logparser/demo/../logparser/Drain/Drain.py", line 285, in parse
self.outputResult(logCluL)
File "/home/featurize/logparser/logparser/demo/../logparser/Drain/Drain.py", line 216, in outputResult
self.df_log["ParameterList"] = self.df_log.apply(self.get_parameter_list, axis=1)
File "/environment/miniconda3/lib/python3.8/site-packages/pandas/core/frame.py", line 9568, in apply
return op.apply().finalize(self, method="apply")
File "/environment/miniconda3/lib/python3.8/site-packages/pandas/core/apply.py", line 764, in apply
return self.apply_standard()
File "/environment/miniconda3/lib/python3.8/site-packages/pandas/core/apply.py", line 891, in apply_standard
results, res_index = self.apply_series_generator()
File "/environment/miniconda3/lib/python3.8/site-packages/pandas/core/apply.py", line 907, in apply_series_generator
results[i] = self.f(v)
File "/home/featurize/logparser/logparser/demo/../logparser/Drain/Drain.py", line 339, in get_parameter_list
template_regex = re.sub(r'\ +', r'\s+', template_regex)
File "/environment/miniconda3/lib/python3.8/re.py", line 210, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "/environment/miniconda3/lib/python3.8/re.py", line 327, in _subx
template = _compile_repl(template, pattern)
File "/environment/miniconda3/lib/python3.8/re.py", line 318, in _compile_repl
return sre_parse.parse_template(repl, pattern)
File "/environment/miniconda3/lib/python3.8/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
The text was updated successfully, but these errors were encountered: