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

[FEATURE]: Don't assume 'None' for agency_id when column is missing from route table #19

Closed
CityDweller opened this issue Feb 19, 2024 · 4 comments

Comments

@CityDweller
Copy link

I see this entry in my log and it is causing me to miss other issues that may be present:

2024-02-19 18:28:55.982 WARNING (MainThread) [custom_components.gtfs2.sensor] Agency ID 'None' was not found in agency table, you may want to update the routes database table to fix this missing reference

In my case, the agency.txt file has "CATS" as the agency_id value and it is the only entry in the file. The routes.txt file doesn't have a column for agency_id--and I don't believe it is required when there is only a single agency represented--my opinion only.

Can this message be scaled back to maybe only written upon start up of the service?

@vingerha
Copy link
Owner

vingerha commented Feb 20, 2024

The agency is used to select the timezone for the data-set it belongs to and can indeed be missing/incorrect.... I cannot tell why this is the case in your situation as the loading of that info is done by the external pygtfs library (out of my control). At the moment it indeed runs every time when the sensor collects data and I have no 1-time-only setting for that. What I can do is to change the log level to 'debug'.
EDIT: I donot really want to create some less simple code-stuff 'just-for-this' :)

@CityDweller
Copy link
Author

The agency table is present, it is just the agency_id value doesn't match what is assumed from the routes table what that table doesn't have an agency_id colunn.

If 'debug' can keep the message from showing up twice a minute, that would be great.

@vingerha
Copy link
Owner

Changed it but will await more changes before creating a new release. If you are in a hurry you can update sensor.py yourselves :)

@vingerha
Copy link
Owner

Fixed in 035

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

No branches or pull requests

2 participants