Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Bus timetable #11

Open
kylow-may opened this issue Dec 22, 2020 · 15 comments
Open

No Bus timetable #11

kylow-may opened this issue Dec 22, 2020 · 15 comments
Assignees

Comments

@kylow-may
Copy link

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

@bremor
Copy link
Owner

bremor commented Dec 23, 2020

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

@kylow-may
Copy link
Author

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
Copy link
Owner

bremor commented Dec 27, 2020

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
Copy link
Owner

bremor commented Dec 27, 2020

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
Copy link
Owner

bremor commented Jan 12, 2021

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

@bremor bremor closed this as completed Jan 12, 2021
@kylow-may
Copy link
Author

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.

@bremor bremor reopened this Apr 5, 2022
@kylow-may
Copy link
Author

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
Copy link
Author

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
Copy link

yalexau commented Feb 14, 2023

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

@catatonicChimp
Copy link
Collaborator

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
Copy link

yalexau commented Oct 6, 2024

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
Copy link
Author

kylow-may commented Oct 6, 2024 via email

@catatonicChimp
Copy link
Collaborator

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

@kylow-may
Copy link
Author

kylow-may commented Oct 6, 2024 via email

@catatonicChimp
Copy link
Collaborator

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)

@catatonicChimp catatonicChimp self-assigned this Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants