Spaces:
Configuration error
Configuration error
ORION System Update 2026-05-12: Multi-Agent Discussion, KRIA Validation, Agent Refactor, DDGK->ORION Migration
da3e674 | #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """Direct debug of _http_get""" | |
| import sys, os | |
| project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| if project_root not in sys.path: | |
| sys.path.insert(0, project_root) | |
| import asyncio | |
| import requests | |
| from space.eu_gaia_x_adapter import EUGaiaXAdapter | |
| async def main(): | |
| a = EUGaiaXAdapter() | |
| # Test 1: URL with inline params (like health_check) | |
| print("Test 1: URL with inline params") | |
| url1 = "https://api.openaire.eu/search/publications?format=json&size=2&title=climate" | |
| try: | |
| d1 = await a._http_get(url1, timeout=15) | |
| print(f" type={type(d1)}, is_none={d1 is None}") | |
| if isinstance(d1, dict): | |
| print(f" keys={list(d1.keys())}") | |
| except Exception as e: | |
| print(f" EXCEPTION: {e}") | |
| # Test 2: URL + params dict (like query_openaire) | |
| print("\nTest 2: URL + params dict") | |
| url2 = "https://api.openaire.eu/search/publications" | |
| params2 = {"format": "json", "size": 2, "title": "climate"} | |
| try: | |
| d2 = await a._http_get(url2, params=params2, timeout=15) | |
| print(f" type={type(d2)}, is_none={d2 is None}") | |
| if isinstance(d2, dict): | |
| print(f" keys={list(d2.keys())}") | |
| except Exception as e: | |
| print(f" EXCEPTION: {e}") | |
| # Test 3: Direct requests call | |
| print("\nTest 3: Direct requests.get") | |
| try: | |
| r = requests.get(url2, params=params2, timeout=15) | |
| print(f" status={r.status_code}, url={r.url}") | |
| d3 = r.json() | |
| print(f" type={type(d3)}, keys={list(d3.keys())}") | |
| except Exception as e: | |
| print(f" EXCEPTION: {e}") | |
| await a.close() | |
| asyncio.run(main()) | |