We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I recently noticed that I can connect and auth to a HyP3 deployment even if I don't provide https:// as part of the API URL:
https://
>>> import hyp3_sdk as sdk >>> hyp3 = sdk.HyP3('hyp3-api.asf.alaska.edu')
but if I try and interact with HyP3 at all, I get a requests exception:
>>> hyp3.my_info() Traceback (most recent call last): File "/home/jhkennedy/mambaforge/envs/RAiDER/lib/python3.12/site-packages/IPython/core/interactiveshell.py", line 3548, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-4-4c1162596b76>", line 1, in <module> hyp3.my_info() File "/home/jhkennedy/mambaforge/envs/RAiDER/lib/python3.12/site-packages/hyp3_sdk/hyp3.py", line 487, in my_info response = self.session.get(urljoin(self.url, '/user')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jhkennedy/mambaforge/envs/RAiDER/lib/python3.12/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jhkennedy/mambaforge/envs/RAiDER/lib/python3.12/site-packages/requests/sessions.py", line 575, in request prep = self.prepare_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jhkennedy/mambaforge/envs/RAiDER/lib/python3.12/site-packages/requests/sessions.py", line 486, in prepare_request p.prepare( File "/home/jhkennedy/mambaforge/envs/RAiDER/lib/python3.12/site-packages/requests/models.py", line 368, in prepare self.prepare_url(url, params) File "/home/jhkennedy/mambaforge/envs/RAiDER/lib/python3.12/site-packages/requests/models.py", line 439, in prepare_url raise MissingSchema( requests.exceptions.MissingSchema: Invalid URL '/user': No scheme supplied. Perhaps you meant https:///user?
I think we should handle this better either by adding the https:// ourselves or rejecting URLs that don't have it when we instantiate the HyP3 class.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I recently noticed that I can connect and auth to a HyP3 deployment even if I don't provide
https://
as part of the API URL:but if I try and interact with HyP3 at all, I get a requests exception:
I think we should handle this better either by adding the
https://
ourselves or rejecting URLs that don't have it when we instantiate the HyP3 class.The text was updated successfully, but these errors were encountered: