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
Go to I exported on my MacBook Pro running OS12.3 Monteray using the command in your readme:
'things-cli --csv --recursive all > all.csv && open all.csv'
See error _csv.Error: need to escape, but no escapechar set
Expected behavior
Clean export of cdv.
Additional context
Mannys-MacBook-Pro-2021:things-cli manny$ things-cli --csv --recursive all > all.csv && open all.csv
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin/things-cli", line 33, in
sys.exit(load_entry_point('things-cli==0.1.3', 'console_scripts', 'things-cli')())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 485, in main
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 404, in main
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 420, in main
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 454, in parse_command
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 74, in print_tasks
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 147, in csv_dumps
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 162, in csv_converter
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 162, in csv_converter
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 166, in csv_converter
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/csv.py", line 154, in writerow
return self.writer.writerow(self._dict_to_list(rowdict))
_csv.Error: need to escape, but no escapechar set
P.S. I would also like to filter out (omit) any logged or duplicate items. How do I do that?
Thanks!
Manny
The text was updated successfully, but these errors were encountered:
Thanks for the feedback. That's interesting, as this never happened before with exporting literally thousands of to-dos. Couldn't reproduce it, but I've a suggested patch.
Would you be able to checkout a modified version via git or change Line 144 in File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py from writer = csv.DictWriter(output, fieldnames=fieldnames, delimiter=";")
to writer = csv.DictWriter(output, fieldnames=fieldnames, delimiter=";", escapechar='\\')
?
Besides this, you can use all the filters (e.g, --filtertag) in the export. Run things-cli -h for details.
To Reproduce
Steps to reproduce the behavior:
'things-cli --csv --recursive all > all.csv && open all.csv'
_csv.Error: need to escape, but no escapechar set
Expected behavior
Clean export of cdv.
Additional context
Mannys-MacBook-Pro-2021:things-cli manny$ things-cli --csv --recursive all > all.csv && open all.csv
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin/things-cli", line 33, in
sys.exit(load_entry_point('things-cli==0.1.3', 'console_scripts', 'things-cli')())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 485, in main
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 404, in main
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 420, in main
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 454, in parse_command
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 74, in print_tasks
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 147, in csv_dumps
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 162, in csv_converter
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 162, in csv_converter
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/things_cli-0.1.3-py3.10.egg/things_cli/cli.py", line 166, in csv_converter
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/csv.py", line 154, in writerow
return self.writer.writerow(self._dict_to_list(rowdict))
_csv.Error: need to escape, but no escapechar set
P.S. I would also like to filter out (omit) any logged or duplicate items. How do I do that?
Thanks!
Manny
The text was updated successfully, but these errors were encountered: