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

GTFS error on startup #84057

Closed
InterferencePattern opened this issue Dec 15, 2022 · 2 comments
Closed

GTFS error on startup #84057

InterferencePattern opened this issue Dec 15, 2022 · 2 comments

Comments

@InterferencePattern
Copy link

The problem

I'm seeing a bug in the GTFS integration after the sqlite database has been generated, and the integration fails to produce an entity.

"Error while setting up gtfs platform for sensor" (Full stack trace below)

What version of Home Assistant Core has the issue?

2022.11.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

General Transit Feed Specification (GTFS)

Link to integration documentation on our website

https://www.home-assistant.io/integrations/gtfs/

Diagnostics information

No response

Example YAML snippet

- platform: gtfs
  origin: place-FR-0098
  destination: place-portr
  data: MBTA_GTFS.zip
  name: mbta

Anything in the logs that might be useful for us?

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/gtfs/sensor.py", line 509, in setup_platform
    pygtfs.append_feed(gtfs, os.path.join(gtfs_dir, data))
  File "/usr/local/lib/python3.10/site-packages/pygtfs/loader.py", line 87, in append_feed
    instance = gtfs_class(feed_id=feed_id, **record._asdict())
  File "<string>", line 4, in __init__
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/state.py", line 481, in _initialize_instance
    with util.safe_reraise():
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_
    raise exception
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/state.py", line 479, in _initialize_instance
    return manager.original_init(*mixed[1:], **kwargs)
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/decl_base.py", line 1200, in _declarative_constructor
    setattr(self, k, kwargs[k])
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 460, in __set__
    self.impl.set(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 1098, in set
    value = self.fire_replace_event(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 1106, in fire_replace_event
    value = fn(
  File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/util.py", line 185, in set_
    return validator(state.obj(), key, value)
  File "/usr/local/lib/python3.10/site-packages/pygtfs/gtfs_entities.py", line 73, in in_range
    float_value = float(value)
TypeError: float() argument must be a string or a real number, not 'NoneType'

Additional information

No response

@home-assistant
Copy link

@InterferencePattern
Copy link
Author

InterferencePattern commented Dec 15, 2022

Problem exists in dependency- fixing it there instead.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant