HDFGroup / h5pyd

h5py distributed - Python client library for HDF Rest API
Other
114 stars 38 forks source link

404 when running testall.py #82

Closed Akshay-Thakare closed 4 years ago

Akshay-Thakare commented 4 years ago

Hi,

When i run testall.py i get a 404 not found. (I am running HSDS v0.5 on docker in the same machine)

(base) ubuntu@ip-173-21-18-123:~/h5pyd$ python testall.py
test_attribute
filename: create_attribute.h5pyd_test.hdfgroup.org
E
======================================================================
ERROR: test_create (__main__.TestAttribute)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_attribute.py", line 33, in test_create
    f = h5py.File(filename, 'w')
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/h5pyd/_hl/files.py", line 233, in __init__
    raise IOError(rsp.status_code, rsp.reason)
OSError: [Errno 404] Not Found

Kindly let me know how to resolve this issue.

Thanks, Akshay

jreadey commented 4 years ago

The test is trying to create a domain at /org/hdfgroup/h5pyd_test/create_attribute (create_attribute.h5pyd_test.hdfgroup.org is the DNS form of this).

Likely you don't have a folder setup at /org/hdfgroup/h5pyd_test which is why you get the 404.

You can override the defaults the h5pyd tests use with environment variables. Say you have a username: akshay, a home folder /home/akshay/ and have created a test folder h5pyd_test (hstouch /home/akshay/h5pyd_test). You can set these environment variables:

export HS_USERNAME="akshay"
export HS_PASSWORD="your_password"
export HS_ENDPOINT="http://hsds.hdf.test"  # update to point to your server
export H5PYD_TEST_FOLDER="/home/akshay/h5pyd_test/"
export TEST2_USERNAME="test_user2"
export TEST2_PASSWORD="test_user2_password"

Let me know if that works for you.

Akshay-Thakare commented 4 years ago

Worked. Thank you