corriporai / runpandas

RunPandas - Python Package for handing running data from GPS-enabled devices to worldwide race results.
https://runpandas.readthedocs.io/en/latest/
MIT License
23 stars 5 forks source link

BUG: numpy has no attribute bool - for numpy versions less than 1.24 and pandas 1.0.5 #78

Open marcelcaraciolo opened 1 year ago

marcelcaraciolo commented 1 year ago

Problem description

Since the release of numpy 1.24 the. old releases from pandas such as 1.0.5 doesn't work with new releases.

THe workaround was to hard-code the pip-install numpy with pip install "numpy<1.24" lxml in pypi-installer.sh

Code Sample, a copy-pastable example

pypi-installer.sh

python -m pip install --upgrade pip
pip install "numpy<1.24" lxml
pip install -r requirements-dev.txt
pip install -r requirements.txt

Expected Output

Output of CI-Actions with numpy 1.24.1

Link for output of the action

eturned Python scalars in past versions. import pandas._libs.testing as _testing Traceback (most recent call last): File "", line 1, in File "/home/runner/work/runpandas/runpandas/runpandas/__init__.py", line 1, in from runpandas.reader import _read_file as read_file # noqa File "/home/runner/work/runpandas/runpandas/runpandas/reader.py", line 6, in import pandas as pd File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/pandas/__init__.py", line 180, in import pandas.testing File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/pandas/testing.py", line 5, in from pandas._testing import ( File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/pandas/_testing.py", line 24, in import pandas._libs.testing as _testing File "pandas/_libs/testing.pyx", line 10, in init pandas._libs.testing File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__ raise AttributeError("module {!r} has no attribute " AttributeError: module 'numpy' has no attribute 'bool' Error: Process completed with exit code 1.