I am trying to export all the data for a particular resource model to CSV
for review and modification and ran into an error during the process --
UnicodeEncodeError:
'ascii' codec can't encode character u'\xa6' in position 51: ordinal not in
range(128)
*My command*
python manage.py packages -o export_business_data -d
'/hpladata/Projects/Downloads/Historic District Mapping Files' -f 'csv' -c
'/hpladata/Projects/Downloads/Historic District Mapping Files/Historic
District.mapping'
*Here's the full error dump*
operation: export_business_data
Traceback (most recent call last):
File "manage.py", line 29, in <module>
execute_from_command_line(sys.argv)
File
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
File
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
line 330, in execute
output = self.handle(*args, **options)
File "/Projects/prod/arches/arches/management/commands/packages.py", line
190, in handle
self.export_business_data(options['dest_dir'], options['format'],
options['config_file'], options['graphs'], options['single_file'])
File "/Projects/prod/arches/arches/management/commands/packages.py", line
770, in export_business_data
data = resource_exporter.export(graph_id=graph,
resourceinstanceids=None)
File
"/Projects/prod/arches/arches/app/utils/data_management/resources/exporter.py",
line 37, in export
resources = self.writer.write_resources(graph_id=graph_id,
resourceinstanceids=resourceinstanceids)
File
"/Projects/prod/arches/arches/app/utils/data_management/resources/formats/csvfile.py",
line 194, in write_resources
csvs_for_export = csvs_for_export + self.write_resource_relations(
file_name=self.file_name)
File
"/Projects/prod/arches/arches/app/utils/data_management/resources/formats/csvfile.py",
line 215, in write_resource_relations
csvwriter.writerow({k:str(v) for k,v in relation.items()})
File
"/Projects/prod/arches/arches/app/utils/data_management/resources/formats/csvfile.py",
line 215, in <dictcomp>
csvwriter.writerow({k:str(v) for k,v in relation.items()})
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa6' in
position 51: ordinal not in range(128)
Any suggestions?
Thanks,
Martha
--
-- To post, send email to [email protected]. To unsubscribe, send
email to [email protected]. For more information,
visit https://groups.google.com/d/forum/archesproject?hl=en
---
You received this message because you are subscribed to the Google Groups
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/archesproject/d6d3e95f-b82c-4815-a40b-0e3805594ffe%40googlegroups.com.