HDFGroup / HDFGroup/h5pyd

Ending the `endpoint` parameter in a `/` causes an error

Closed
#105 0 comments 0 reactions 1 assignee Claimed by @jreadey View on GitHub
enhancement
Dominant language
Python
Stars
124
Forks
46
Avg merge
1h 24m
Merged PRs (30d)
6

Description

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 "", line 1, in
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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.