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

Inquire how to avoid "Error: need to escape, but no escapechar set" this problem #122

Open
Tan3364 opened this issue Dec 5, 2024 · 2 comments

Comments

@Tan3364
Copy link

Tan3364 commented Dec 5, 2024

Hi, when I tried to use whole raw logfile datasets to the parser, I used the Drain, then it showed this bug.
I wanted to ask if I need to do anything before putting it in the Drain.
But I tried any given 2k datasets, it will not show this bug.
Traceback (most recent call last):
File "C:\Users\Lenovo\Desktop\logparser-main\logparser-main\logparser\Drain\Try.py", line 56, in
parser.parse(log_file)
File "C:\Users\Lenovo.conda\envs\GLBench\lib\site-packages\logparser\Drain\Drain.py", line 312, in parse
self.outputResult(logCluL)
File "C:\Users\Lenovo.conda\envs\GLBench\lib\site-packages\logparser\Drain\Drain.py", line 237, in outputResult
self.df_log.to_csv(
File "C:\Users\Lenovo\AppData\Roaming\Python\Python310\site-packages\pandas\core\generic.py", line 3772, in to_csv
return DataFrameRenderer(formatter).to_csv(
File "C:\Users\Lenovo\AppData\Roaming\Python\Python310\site-packages\pandas\io\formats\format.py", line 1186, in to_csv
csv_formatter.save()
File "C:\Users\Lenovo\AppData\Roaming\Python\Python310\site-packages\pandas\io\formats\csvs.py", line 259, in save
self._save()
File "C:\Users\Lenovo\AppData\Roaming\Python\Python310\site-packages\pandas\io\formats\csvs.py", line 264, in _save
self._save_body()
File "C:\Users\Lenovo\AppData\Roaming\Python\Python310\site-packages\pandas\io\formats\csvs.py", line 302, in _save_body
self._save_chunk(start_i, end_i)
File "C:\Users\Lenovo\AppData\Roaming\Python\Python310\site-packages\pandas\io\formats\csvs.py", line 313, in _save_chunk
libwriters.write_csv_rows(
_File "pandas_libs\writers.pyx", line 72, in pandas._libs.writers.write_csv_rows
csv.Error: need to escape, but no escapechar set

Process finished with exit code 1

@sebm123
Copy link

sebm123 commented Dec 9, 2024

****

@Tan3364
Copy link
Author

Tan3364 commented Dec 17, 2024

****

Hi, could you tell me the exact processing?

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