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

Ending the endpoint parameter in a / causes an error #105

Open
hickey opened this issue Sep 15, 2021 · 0 comments
Open

Ending the endpoint parameter in a / causes an error #105

hickey opened this issue Sep 15, 2021 · 0 comments
Assignees

Comments

@hickey
Copy link
Contributor

hickey commented Sep 15, 2021

I have found (although it really should be another issue) that the endpoint parameter acts differently if there is a slash at the end of the value.

>>> f = h5pyd.File('test4', 'r', endpoint='https://h5.wt0f.com/', username='xxxx', password='xxxxx')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/h5pyd/_hl/files.py", line 236, in __init__
    raise IOError(rsp.status_code, rsp.reason)
OSError: [Errno 400] Bad Request
>>> f = h5pyd.File('test4', 'r', endpoint='https://h5.wt0f.com', username='xxxx', password='xxxx')
>>>

That just seems wrong to me. If there is a reason that a final slash is not acceptable, should there be a test to remove the final slash if it is supplied?

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

No branches or pull requests

2 participants