Spaces:
Running
Running
| import asyncio | |
| from services.location_service import get_location_details | |
| from services.weather_service import fetch_current_weather | |
| async def debug(): | |
| try: | |
| query = "New York" | |
| print(f"Resolving location for {query}...") | |
| location = await get_location_details(query) | |
| print(f"Location: {location}") | |
| print(f"Fetching weather for {location.lat}, {location.lon}...") | |
| weather = await fetch_current_weather(float(location.lat), float(location.lon)) | |
| print(f"Weather: {weather}") | |
| except Exception as e: | |
| import traceback | |
| traceback.print_exc() | |
| if __name__ == "__main__": | |
| asyncio.run(debug()) | |