ghing / census-data

Reusable Census data that can be useful to multiple projects.
3 stars 1 forks source link

Error when downloading tract boundaries #2

Closed ghing closed 3 years ago

ghing commented 3 years ago

I was getting an error when running make data/processed/tracts_2010.geojson:

Traceback (most recent call last):
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/bin/censusmapdownloader", line 5, in <module>
    from census_map_downloader.cli import cmd
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/census_map_downloader/__init__.py", line 1, in <module>
    from .base import BaseDownloader
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/census_map_downloader/base.py", line 7, in <module>
    import geopandas as gpd
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/geopandas/__init__.py", line 7, in <module>
    from geopandas.io.file import _read_file as read_file  # noqa
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/geopandas/io/file.py", line 20, in <module>
    from fiona import Env as fiona_env
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/fiona/__init__.py", line 85, in <module>
    with fiona._loading.add_gdal_dll_directories():
AttributeError: partially initialized module 'fiona' has no attribute '_loading' (most likely due to a circular import)

I suspect this is maybe because of recent OS and Homebrew updates.

ghing commented 3 years ago

o try to fix things, I reinstalled my fork of census-map-downloader, which hopefully kickstarted a reinstall of fiona.

pipenv uninstall census-map-downloader
pipenv clean
pipenv install git+https://github.com/ghing/census-map-downloader.git@8-support-year#egg=census-map-downloader

Doing this seemed to fix the problem.