You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inquire how to avoid "Error: need to escape, but no escapechar set" this problem #122
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
Activity
sebm123 commentedon Dec 9, 2024
Tan3364 commentedon Dec 17, 2024
Hi, could you tell me the exact processing?
zhujiem commentedon Feb 19, 2025
If you encouter the issue ``Error: need to escape..." during saving csv file, please follow the modification in this PR: #120.
If you encouter other issues, please consider using the same dependency versions as below: https://github.com/logpai/logparser/tree/main/logparser/Drain#running