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

pandas EmptyDataError moved from pandas.io.common to pandas.errors #42

Open
KlausGPaul opened this issue May 20, 2021 · 0 comments
Open

Comments

@KlausGPaul
Copy link

When building/running landsat using python 3.8.6 and pandas 1.1.4, and executing the proposed command line

landsat -sat 7 --start 2007-05-01 --end 2007-05-31 --lat -51.5 --lon 71.25

an error is generated and the script stops:-

Traceback (most recent call last):
  File "........./anaconda3/envs/tmp/bin/landsat", line 33, in <module>
    sys.exit(load_entry_point('Landsat578==0.5.1', 'console_scripts', 'landsat')())
  File "........./anaconda3/envs/tmp/lib/python3.7/site-packages/pkg_resources/__init__.py", line 488, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "........./anaconda3/envs/tmp/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2872, in load_entry_point
    return ep.load()
  File "........./anaconda3/envs/tmp/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2472, in load
    return self.resolve()
  File "........./anaconda3/envs/tmp/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2478, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "........./anaconda3/envs/tmp/lib/python3.7/site-packages/landsat/landsat_cli.py", line 26, in <module>
    from landsat.google_download import GoogleDownload
  File "........./anaconda3/envs/tmp/lib/python3.7/site-packages/landsat/google_download.py", line 36, in <module>
    from landsat.update_landsat_metadata import update_metadata_lists, get_wrs_shapefiles
  File "........./anaconda3/envs/tmp/lib/python3.7/site-packages/landsat/update_landsat_metadata.py", line 24, in <module>
    from pandas.io.common import EmptyDataError
ImportError: cannot import name 'EmptyDataError' from 'pandas.io.common' (........./anaconda3/envs/tmp/lib/python3.7/site-packages/pandas/io/common.py)

Apparently, in the mean time, EmptyDataError moved from pandas.io.common to pandas.errors, ref pandas-dev/pandas#37978

Changing landsat/update_landsat_metadata.py line 24 from

from pandas.io.common import EmptyDataError

to

from pandas.errors import EmptyDataError

clears the issue.

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

1 participant