remix/partridge

numpy attribute issue in gtfs.py

mluc08 opened this issue · 3 comments

  • partridge version:
  • Python version:
  • Operating System:

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 "

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

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

Hi - this should be fixed with #69 merged.