bremor / public_transport_victoria

Custom component for retrieving departure times for Public Transport Victoria.
31 stars 7 forks source link

No Bus timetable #11

Open kylow-may opened 3 years ago

kylow-may commented 3 years ago

When I tried to load the PTV bus timetables, it goes into a loop.

bremor commented 3 years ago

Thanks for raising this issue! Before I take a look is there anything in your logs when you try this?

kylow-may commented 3 years ago

It says time out...

Traceback (most recent call last): File "/config/custom_components/public_transport_victoria/config_flow.py", line 66, in async_step_route_types self.routes = await self.connector.async_routes( File "/config/custom_components/public_transport_victoria/PublicTransportVictoria/public_transport_victoria.py", line 73, in async_routes response = await response.json() File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1094, in json await self.read() File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1034, in read self._body = await self.content.read() File "/usr/local/lib/python3.8/site-packages/aiohttp/streams.py", line 371, in read block = await self.readany() File "/usr/local/lib/python3.8/site-packages/aiohttp/streams.py", line 393, in readany await self._wait("readany") File "/usr/local/lib/python3.8/site-packages/aiohttp/streams.py", line 307, in _wait await waiter File "/usr/local/lib/python3.8/site-packages/aiohttp/helpers.py", line 656, in exit raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError

bremor commented 3 years ago

Thanks, I was able to replicate the issue, but then it magically started working, so i'm not sure what's going on here. I have released a new verison which has additional debugging information which will help us troubleshoot if this happens again.

bremor commented 3 years ago

I have discovered the list of bus routes is huge. The response from the PTV API is 188,000 characters long... I think the python code is having issues with the large response. If you keep trying 3-4 times it might just fix it and allow you to set up this integration.

bremor commented 3 years ago

Closing this issue, feel free to reopen if you keep having this issue.

kylow-may commented 2 years ago

Issue kept surfacing again. I didn't look at it until now. The bus time tables are not loadable at all. Kept failing from time to time.

kylow-may commented 2 years ago

Is it possible to extend the timeout and the download size. Got a feeling it is the reason for the intermittent failure and the need to retry multiple times to get the data.

kylow-may commented 2 years ago

And it is possible to have the bus number instead of that long description. Sometimes I cannot tell the bus number from the description.

yalexau commented 1 year ago

Can confirm a timeout error is occurring on bus networks, is there a way to increase the timeout?

catatonicChimp commented 3 weeks ago

Is this still an issue? Seems to work ok here, but I agree we do need to add in route numbers before the route name (in progress)

yalexau commented 3 weeks ago

Is this still an issue? Seems to work ok here, but I agree we do need to add in route numbers before the route name (in progress)

been working for me so far

kylow-may commented 3 weeks ago

Yes it is. Noticed PTV timetable for buses has not been maintained at all.

On Sun, 6 Oct 2024 at 9:52 AM, Andrew Taylor @.***> wrote:

Is this still an issue? Seems to work ok here, but I agree we do need to add in route numbers before the route name (in progress)

— Reply to this email directly, view it on GitHub https://github.com/bremor/public_transport_victoria/issues/11#issuecomment-2395218774, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQCWVRS2V4RR34QAITW463TZ2BUSZAVCNFSM6AAAAABPNXK4F6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJVGIYTQNZXGQ . You are receiving this because you authored the thread.Message ID: @.***>

catatonicChimp commented 3 weeks ago

Can you give me an example of a route that isn't working?

kylow-may commented 3 weeks ago

Bus route 903, 279, 302 etc. Some works for a short time and then stop working. Connections have to be deleted and restart again. It happens very often.

On Sun, 6 Oct 2024 at 1:17 PM, Andrew Taylor @.***> wrote:

Can you give me an example of a route that isn't working?

— Reply to this email directly, view it on GitHub https://github.com/bremor/public_transport_victoria/issues/11#issuecomment-2395262941, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQCWVRW3P2P4YMZXJAY5DLDZ2CMTTAVCNFSM6AAAAABPNXK4F6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJVGI3DEOJUGE . You are receiving this because you authored the thread.Message ID: @.***>

catatonicChimp commented 3 weeks ago

Ok will have a look, but sounds at least on the surface like a ptv data issue, but if that is the case we should still handle that a bit cleaner

In the meantime can you update to the latest release 0.6 (from last night and see if the issue persists)