Closed ric-evans closed 2 years ago
What's the actual error? Could this relate to using __all__
?
What's the actual error? Could this relate to using
__all__
?
E ImportError: cannot import name 'schema' from partially initialized module 'file_catalog' (most likely due to a circular import) (/home/circleci/project/.tox/py/lib/python3.8/site-packages/file_catalog/__init__.py)
https://github.com/WIPACrepo/file_catalog/pull/131 did not fix this. Unsure if this is still a problem
The Indexer isn't breaking, that's true. There are still non-relative imports here. However, that doesn't seem to be an issue after all.
Since
schema
is being exported in the base__init__.py
, the sub-package's modules themselves cannot import fromfile_catalog
. To prevent this and from happening elsewhere in other modules, use relative imports everywhere (from . import xyz
).