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 versions specified for some dependencies #38

Open
willandersson1 opened this issue Jan 3, 2024 · 1 comment
Open

No versions specified for some dependencies #38

willandersson1 opened this issue Jan 3, 2024 · 1 comment

Comments

@willandersson1
Copy link

Hi, thanks for the great library. I noticed that there are no versions specified for some of the dependencies (pandas, geopandas, numpy). This caused issues for me because my project's requirements installs pandas 1.4.4. I can then install gtfs_functions with no issues, but when I try to run the code I get runtime errors due to gtfs_functions relying on newer syntax of pandas.

For example, with pandas 1.4.4, gtfs_functions 2.1:

from gtfs_functions import Feed
GTFS_PATH = 'https://data.stadt-zuerich.ch/dataset/vbz_fahrplandaten_gtfs/download/2024_google_transit.zip'
feed =  Feed(GTFS_PATH, patterns=False)
concatted_ids_names = feed.stop_times.groupby('trip_id', as_index=False)

produces an error on line 4:

Traceback (most recent call last):
  File XXX, line 4, in <module>
    concatted_ids_names = feed.stop_times.groupby('trip_id', as_index=False)
  File "venv/lib/python3.10/site-packages/gtfs_functions/gtfs_functions.py", line 203, in stop_times
    self._stop_times = self.get_stop_times()
  File "venv/lib/python3.10/site-packages/gtfs_functions/gtfs_functions.py", line 647, in get_stop_times
    trips = self.trips
  File "venv/lib/python3.10/site-packages/gtfs_functions/gtfs_functions.py", line 173, in trips
    self._trips = self.get_trips()
  File "venv/lib/python3.10/site-packages/gtfs_functions/gtfs_functions.py", line 589, in get_trips
    trips = trips.set_index('service_id').join(
  File "venv/lib/python3.10/site-packages/pandas/util/_decorators.py", line 311, in wrapper
    return func(*args, **kwargs)
TypeError: DataFrame.reset_index() got an unexpected keyword argument 'names'

There's no issue if I install the latest version of pandas (or install gtfs_functions before installing pandas).

Thanks for your time!

@Bondify
Copy link
Owner

Bondify commented Feb 7, 2024

hi @willandersson1 , it makes sense. I'll pin specific versions of the packages.

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