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

Can not load the zip file #71

Closed
MajesticMinhaz opened this issue Mar 18, 2023 · 4 comments
Closed

Can not load the zip file #71

MajesticMinhaz opened this issue Mar 18, 2023 · 4 comments

Comments

@MajesticMinhaz
Copy link

Traceback (most recent call last):
  File "/home/mdminhaz/pycharm-community-2022.3.2/plugins/python-ce/helpers/pydev/pydevconsole.py", line 364, in runcode
    coro = func()
  File "<input>", line 1, in <module>
  File "/home/mdminhaz/PycharmProjects/gtfs-practice/venv/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 "/home/mdminhaz/PycharmProjects/gtfs-practice/venv/lib64/python3.10/site-packages/sqlalchemy/orm/state.py", line 575, in _initialize_instance
    with util.safe_reraise():
  File "/home/mdminhaz/PycharmProjects/gtfs-practice/venv/lib64/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 147, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/home/mdminhaz/PycharmProjects/gtfs-practice/venv/lib64/python3.10/site-packages/sqlalchemy/orm/state.py", line 573, in _initialize_instance
    manager.original_init(*mixed[1:], **kwargs)
  File "/home/mdminhaz/PycharmProjects/gtfs-practice/venv/lib64/python3.10/site-packages/sqlalchemy/orm/decl_base.py", line 2076, in _declarative_constructor
    setattr(self, k, kwargs[k])
  File "/home/mdminhaz/PycharmProjects/gtfs-practice/venv/lib64/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 528, in __set__
    self.impl.set(
  File "/home/mdminhaz/PycharmProjects/gtfs-practice/venv/lib64/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 1261, in set
    value = self.fire_replace_event(
  File "/home/mdminhaz/PycharmProjects/gtfs-practice/venv/lib64/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 1276, in fire_replace_event
    value = fn(
  File "/home/mdminhaz/PycharmProjects/gtfs-practice/venv/lib64/python3.10/site-packages/sqlalchemy/orm/events.py", line 2590, in wrap
    return fn(target, *arg)
  File "/home/mdminhaz/PycharmProjects/gtfs-practice/venv/lib64/python3.10/site-packages/sqlalchemy/orm/util.py", line 322, in set_
    return validator(state.obj(), key, value)
  File "/home/mdminhaz/PycharmProjects/gtfs-practice/venv/lib/python3.10/site-packages/pygtfs/gtfs_entities.py", line 86, in is_float_none
    return float(value)
TypeError: float() argument must be a string or a real number, not 'NoneType'

@InterferencePattern
Copy link
Collaborator

Please provide some context...

  1. What is the dataset you're using?
  2. What was the code you were running?

It looks like there's a missing value in the dataset. It could be in an optional field, but we have no way to know without seeing the file.

@superrache
Copy link

I got the same error using Pypi package v0.1.7. However, this issue seems to have been fixed (#67). Why the Pypi package is not updated?

@InterferencePattern
Copy link
Collaborator

@superrache , you're right- it looks like there hasn't been a release of pygtfs released since that PR was merged.

@jarondl
Copy link
Owner

jarondl commented Jul 16, 2023

0.1.9 was released to PyPI. I'm closing this.

@jarondl jarondl closed this as completed Jul 16, 2023
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

4 participants