Description
I am encountering a persistent error in PyScript when trying to perform an asynchronous HTTP request using aiohttp. Despite adhering to the asyncio guidelines and leveraging Home Assistant’s async_get_clientsession, the following error occurs consistently. This error arises regardless of the specific HTTP client method (response.text(), response.json(), or others), suggesting a deeper issue with how PyScript interprets awaitable objects.
1. The same code works flawlessly in a standalone Python environment.
2. Using task.executor to offload synchronous requests calls also fails due to PyScript restrictions.
3. The issue persists across various attempts to simplify the logic.
The issue seems to stem from PyScript misinterpreting certain objects (e.g., str or dict) as awaitable. This is not typical behavior for asyncio or aiohttp and may indicate a PyScript-specific bug.