Spaces:
Runtime error
Runtime error
Download scripts/debug_conn.py from dashVector/dashVectorSpace: direct link, hf CLI and curl.
- Browser
- Download file 692 Bytes
-
https://huggingface.co/spaces/dashVector/dashVectorSpace/resolve/4267104f458cf032c4c3e3e1edd08d8dc120c196/scripts/debug_conn.py
- Command line
-
hf download hf://spaces/dashVector/dashVectorSpace@4267104f458cf032c4c3e3e1edd08d8dc120c196/scripts/debug_conn.py
-
curl -L -o debug_conn.py https://huggingface.co/spaces/dashVector/dashVectorSpace/resolve/4267104f458cf032c4c3e3e1edd08d8dc120c196/scripts/debug_conn.py
692 Bytes
| import httpx | |
| import os | |
| url = "https://justmotes-xvector-db-node.hf.space/collections" | |
| headers = {"api-key": "xvector_secret_pass_123"} | |
| print(f"Testing connection to {url}...") | |
| try: | |
| with httpx.Client(http2=True, verify=False) as client: | |
| r = client.get(url, headers=headers, timeout=10) | |
| print(f"HTTP/2 Status: {r.status_code}") | |
| print(r.text[:200]) | |
| except Exception as e: | |
| print(f"HTTP/2 Failed: {e}") | |
| try: | |
| with httpx.Client(http2=False, verify=False) as client: | |
| r = client.get(url, headers=headers, timeout=10) | |
| print(f"HTTP/1.1 Status: {r.status_code}") | |
| print(r.text[:200]) | |
| except Exception as e: | |
| print(f"HTTP/1.1 Failed: {e}") | |