GSA / ckanext-geodatagov

data.gov extension
Other
36 stars 39 forks source link

Fix error while loging #184

Closed avdata99 closed 3 years ago

avdata99 commented 3 years ago

Single PR after discovering error while logging

Traceback (most recent call last):
  File "/usr/bin/ckan", line 45, in <module>
    load_entry_point('PasteScript', 'console_scripts', 'paster')()
  File "/usr/lib/ckan/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/ckan/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/ckan/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
    result = self.command()
  File "/usr/lib/ckan-new/src/ckanext-harvest/ckanext/harvest/commands/harvester.py", line 237, in command
    utils.fetch_consumer()
  File "/usr/lib/ckan-new/src/ckanext-harvest/ckanext/harvest/utils.py", line 351, in fetch_consumer
    fetch_callback(consumer, method, header, body)
  File "/usr/lib/ckan-new/src/ckanext-harvest/ckanext/harvest/queue.py", line 483, in fetch_callback
    fetch_and_import_stages(harvester, obj)
  File "/usr/lib/ckan-new/src/ckanext-harvest/ckanext/harvest/queue.py", line 501, in fetch_and_import_stages
    success_import = harvester.import_stage(obj)
  File "/usr/lib/ckan-new/src/ckanext-spatial/ckanext/spatial/harvesters/base.py", line 609, in import_stage
    package_id = p.toolkit.get_action('package_create')(context, package_dict)
  File "/usr/lib/ckan-new/src/ckan/ckan/logic/__init__.py", line 467, in wrapped
    result = _action(context, data_dict, **kw)
  File "/usr/lib/ckan-new/src/ckanext-geodatagov/ckanext/geodatagov/logic.py", line 480, in package_create
    log.info('chained package_create {} {}'.format(ckan_version, data_dict['title']))
UnicodeEncodeError: 'ascii' codec can't encode character u'\x93' in position 33: ordinal not in range(128)