EUDAT-B2HANDLE / B2HANDLE

B2Handle Python library for interaction with Handle services
https://eudat-b2handle.github.io/
Apache License 2.0
22 stars 24 forks source link

After upgrade of b2handle from version 1.0x to 1.1 it stops functioning on Centos 6.8 #117

Closed cookie33 closed 7 years ago

cookie33 commented 7 years ago

HI,

After building and installing the b2handle library on Centos 6.8 with Python 2.6 it stops functioning. Building was done as follows:

python setup.py bdist_rpm

This so we can install an rpm and see easily what is installed.

The first error is:

./testB2SafeCmd.py -test epic2
Test Epicclient2 Script
Test that create handle returns expected response and adds ... Traceback (most recent call last):
  File "../../cmd/epicclient2.py", line 15, in <module>
    from b2handle.handleclient import EUDATHandleClient
  File "/usr/lib/python2.6/site-packages/b2handle/handleclient.py", line 9, in <module>
    from past.builtins import range

The second was about the future.standard_library in utilhandle.py.

I fixed these with a try except and pass if ImportError but now we have an other error:

  File "/usr/lib/python2.6/site-packages/b2handle/utilhandle.py", line 14, in <module>
    from urllib.parse import quote
ImportError: No module named parse

The version of url lib on my system is:

rpm -qa | grep urllib
python-urllib3-1.10.2-1.el6.noarch

So for the moment I am reverting back to version 1.0.x

cookie33 commented 7 years ago

installed python2-future

yum install python2-future

Than my tests perform better, but still one error:

./testB2SafeCmd.py -test epic2
Test Epicclient2 Script
...
Test that delete non existing handle returns False. ... FAIL
...

======================================================================
FAIL: Test that delete non existing handle returns False.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/robertv/git/B2SAFE-core/scripts/tests/testB2SafeCmd/epic2intgtest.py", line 326, in test_delete_non_existing_handle
    'delete non existing handle should return False')
AssertionError: 'True' != 'False' : delete non existing handle should return False

----------------------------------------------------------------------
Ran 23 tests in 30.918s

FAILED (failures=1)
cookie33 commented 7 years ago

This is the same as the issue: deleting a non-existent handle does not raise an exception #109

TobiasWeigel commented 7 years ago

OK, I looked at the codebase - this apparently fell between the cracks in commit 19f81e26d62f353d975bdb08c69a1c8e78af5d90

SofianeB commented 7 years ago

The fix #109 by Tobias is not in version 1.1.0.