csvdedupe
csvdedupe copied to clipboard
Error writing CSV results
After training and running I get the following error when it tries to write the results:
INFO:root:# duplicate sets 26051
Traceback (most recent call last):
File "/usr/local/bin/csvlink", line 11, in <module>
sys.exit(launch_new_instance())
File "/usr/local/lib/python2.7/site-packages/csvdedupe/csvlink.py", line 210, in launch_new_instance
d.main()
File "/usr/local/lib/python2.7/site-packages/csvdedupe/csvlink.py", line 172, in main
with open(self.output_file, 'wb', encoding='utf-8') as output_file:
ValueError: binary mode doesn't take an encoding argument
Command:
$ csvlink data/owners.csv data/sellers.csv \
--field_names_1 ownername city state \
--field_names_2 name city state \
--output_file data/output.csv
Dropping the encoding argument from csvlink.py line 172 fixes the issue:
with open(self.output_file, 'wb') as output_file: