Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOError when opening metadata schema #174

Closed
LondonAppDev opened this issue May 23, 2017 · 1 comment
Closed

IOError when opening metadata schema #174

LondonAppDev opened this issue May 23, 2017 · 1 comment

Comments

@LondonAppDev
Copy link
Contributor

I am trying to harvest from a CSW endpoint with the following custom configuration:

{"validator_profiles":["gemini2"]}

I am getting the following IOError exception during the fetch stage:

Traceback (most recent call last):
  File "/usr/lib/ckan/default/bin/paster", line 11, in <module>
    sys.exit(run())
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
    result = self.command()
  File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/commands/harvester.py", line 191, in command
    fetch_callback(consumer, method, header, body)
  File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/queue.py", line 409, in fetch_callback
    fetch_and_import_stages(harvester, obj)
  File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/queue.py", line 426, in fetch_and_import_stages
    success_import = harvester.import_stage(obj)
  File "/usr/lib/ckan/default/src/ckanext-spatial/ckanext/spatial/harvesters/base.py", line 496, in import_stage
    is_valid, profile, errors = self._validate_document(harvest_object.content, harvest_object)
  File "/usr/lib/ckan/default/src/ckanext-spatial/ckanext/spatial/harvesters/base.py", line 823, in _validate_document
    valid, profile, errors = validator.is_valid(xml)
  File "/usr/lib/ckan/default/src/ckanext-spatial/ckanext/spatial/validation/validation.py", line 341, in is_valid
    is_valid, error_message_list = validator.is_valid(xml)
  File "/usr/lib/ckan/default/src/ckanext-spatial/ckanext/spatial/validation/validation.py", line 200, in is_valid
    cls.schematrons = cls.get_schematrons()
  File "/usr/lib/ckan/default/src/ckanext-spatial/ckanext/spatial/validation/validation.py", line 282, in get_schematrons
    "validation/xml/gemini2/gemini2-schematron-20110906-v1.2.sch") as schema:
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1209, in resource_stream
    self, resource_name
  File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1574, in get_resource_stream
    return open(self._fn(self.module_path, resource_name), 'rb')
IOError: [Errno 2] No such file or directory: 'validation/xml/gemini2/gemini2-schematron-20110906-v1.2.sch'

I have checked and the validation/xml/gemini2/gemini2-schematron-20110906-v1.2.sch file exists and has read permissions for all users.

I'm interested to know if anyone else is experiencing the same issue?

davidread pushed a commit that referenced this issue Jun 1, 2017
Fix IOError when opening metadata schema #174
@LondonAppDev
Copy link
Contributor Author

This is fixed with #176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant