ckanext-spatial icon indicating copy to clipboard operation
ckanext-spatial copied to clipboard

Dependency version conflict with PyCSW

Open rossjones opened this issue 6 years ago • 4 comments

Depending on the version of PyCSW you install, you may encounter a problem running the ckan-pycsw paster command with:

pkg_resources.ContextualVersionConflict:
 (OWSLib 0.8.6 (/usr/lib/venv/lib/python2.7/site-packages), 
Requirement.parse('OWSLib==0.16.0'), set(['pycsw']))

This is because ckanext-spatial requires 0.8.6 whereas pycsw after a certain version uses more recent OWSLib.


I've worked around this by installing a newer OWSLib, not yet sure what effect it has on the running of ckanext-spatial.

rossjones avatar May 14 '18 14:05 rossjones

I'm pretty sure we can upgrade the ckanext-spatial requirement to align it with pycsw, but I haven't work on the harvesters for a long time. Do you think there will be an issue @tomkralidis? ie are there major API changes from that version?

amercader avatar May 25 '18 13:05 amercader

@amercader there’s nothing breaking in OWSLib AFAICT.

tomkralidis avatar May 26 '18 06:05 tomkralidis

It does seem to be okay in actual use, but the tests do break when I update owslib, but I think it's probably the test being wrong.

======================================================================
ERROR: ckanext.spatial.tests.test_harvest.TestHarvest.test_harvest_fields_service
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/build/rossjones/ckanext-spatial/ckanext/spatial/tests/test_harvest.py", line 268, in test_harvest_fields_service
    if not resource[key] == value:
KeyError: 'verified'
----------------------------------------------------------------------

The problem is likely at https://github.com/ckan/ckanext-spatial/blob/master/ckanext/spatial/harvesters/base.py#L386 (it only adds the verified field when true) .. but I'm afraid I'm out of time to dig deeper.

Maybe a Good for contribution tag?

rossjones avatar May 26 '18 08:05 rossjones

@amercader @tomkralidis @rossjones is there any update to this? We are trying to use the most updated version of spatial but some of our imports fail because OWSLib is not up to date

thejuliekramer avatar Aug 20 '20 21:08 thejuliekramer