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

running python Drain_demo.py , An error occurred #98

Closed
superfeimao opened this issue Jul 23, 2023 · 0 comments
Closed

running python Drain_demo.py , An error occurred #98

superfeimao opened this issue Jul 23, 2023 · 0 comments

Comments

@superfeimao
Copy link

(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

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
xpai pushed a commit that referenced this issue Sep 5, 2023
* Fix PRs: merge #86, merge #85, merge #83, merge #80, merge #78, merge #65, merge #57, merge #53, merge #52, merge #51, merge #49
* Fix issues: #98, #79, #72, #84, #75, #71, #69, #56, #50, #45, #16, #82
@xpai xpai closed this as completed in 3bfb46f Sep 5, 2023
xpai pushed a commit that referenced this issue Sep 5, 2023
* Close PRs: close #86, #85, #83, #80, #78, #65, #57, #53, #52, #51, #49
* Fix issues: fix #98, #79, #72, #84, #75, #71, #69, #56, #50, #45, #16, #82
* Release pypi package wheel
xpai pushed a commit that referenced this issue Sep 5, 2023
* Close PRs: close #86, #85, #83, #80, #78, #65, #57, #53, #52, #51, #49
* Fix issues: fix #98, #79, #72, #84, #75, #71, #69, #56, #50, #45, #16, #82
* Release package wheel to pypi
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

1 participant