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

partially initialized module 'fiona' has no attribute '_loading' (most likely due to a circular import) #1030

Closed
TheoChristiaanse opened this issue Aug 14, 2021 · 2 comments

Comments

@TheoChristiaanse
Copy link

TheoChristiaanse commented Aug 14, 2021

Expected behavior and actual behavior.

I expected it just to import

Steps to reproduce the problem.

import fiona 

Error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/var/folders/6y/ggc338n574d3_xyw2zbnkc6m0000gp/T/ipykernel_1610/1102285635.py in <module>
----> 1 import fiona

/opt/homebrew/lib/python3.9/site-packages/fiona/__init__.py in <module>
     83 
     84 import fiona._loading
---> 85 with fiona._loading.add_gdal_dll_directories():
     86     from fiona.collection import BytesCollection, Collection
     87     from fiona.drvsupport import supported_drivers

AttributeError: partially initialized module 'fiona' has no attribute '_loading' (most likely due to a circular import)

Operating system

Mac OS X 11.5.1

Fiona and GDAL version and provenance

Fiona via pip version 1.8.20
GDAL 3.3.1 installed via Homebrew

@TheoChristiaanse
Copy link
Author

Found the solution

#944 (comment)

@RBhupi
Copy link

RBhupi commented Aug 1, 2022

I am getting the same error with the following import

import glob
import os
import datetime

import numpy as np
import matplotlib.pyplot as plt
import pyart
import xarray as xr
from matplotlib.dates import DateFormatter
import pandas as pd
import geopandas as gpd
import act
import fiona


AttributeError Traceback (most recent call last)
Input In [11], in <cell line: 13>()
11 import geopandas as gpd
12 import act
---> 13 import fiona

File ~/opt/anaconda3/envs/pyart/lib/python3.9/site-packages/fiona/init.py:85, in
82 os.environ["PATH"] = os.environ["PATH"] + ";" + libdir
84 import fiona._loading
---> 85 with fiona._loading.add_gdal_dll_directories():
86 from fiona.collection import BytesCollection, Collection
87 from fiona.drvsupport import supported_drivers

AttributeError: partially initialized module 'fiona' has no attribute '_loading' (most likely due to a circular import)

Please, also check $conda list output Hope this helps.

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

2 participants