remix / partridge

A fast, forgiving GTFS reader built on pandas DataFrames
https://partridge.readthedocs.io
MIT License
152 stars 22 forks source link

numpy attribute issue in gtfs.py #77

Closed mluc08 closed 1 year ago

mluc08 commented 1 year ago

Description

Code stoppe running properly due to package error

What I Did

line 102, in _read_csv df = pd.read_csv(path, dtype=np.unicode, encoding=encoding, index_col=False) File "/home/site/wwwroot/.python_packages/lib/site-packages/numpy/init.py", line 284, in getattr raise AttributeError("module {!r} has no attribute "

macbre commented 1 year ago

The issue here is likely caused by pandas dependency not being pinned to a specific version.

I have it working in an old vevn (Python 2.7 powered) with the following versions of dependencies:

numpy==1.16.6
pandas==0.24.2
partridge==0.10.0
amillb commented 1 year ago

I think this is a simple fix to line 92 of gtfs.py.

Per the numpy docs (see the Deprecations section, line 92 just needs np.unicode to be replaced by str.

I would make a pull request but I'm not familiar with this process.

dget commented 1 year ago

Hi - this should be fixed with #69 merged.