circular (or cyclic) import problem occurred in doctest of rdkit_utils.py
See original GitHub issue🐛 Bug
While running doctest on deepchem/utils/rdkit_utils.py
, an error occurred which suggested that may be, the file: deepchem/utils/typing.py
having the same name as the module it imports (typing
), is causing the circular (or cyclic) import problem.
To Reproduce
Steps to reproduce the behavior:
- open terminal from deepchem/utils
- python -m doctest rdkit_utils.py
- Following error is reported:-
Expected behavior
There should not be any problem importing type annotations from the typing
module or importing from the deepchem.utils.typing
file.
Environment
- OS: Ubuntu 20.04.3 LTS
- Python version: Python 3.8.8
- DeepChem version: 2.6.1
- RDKit version (optional):
- TensorFlow version (optional):
- PyTorch version (optional):
- Any other relevant information: NA
Additional context
https://stackoverflow.com/questions/744373/circular-or-cyclic-imports-in-python
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
What happens when using mutual or circular (cyclic) imports?
I'm using python 3.7.2 and am still having a runtime error because of circular dependencies. – Richard Whitehead. Mar 15, 2019 at 10:19....
Read more >Python Circular Import Problem and Solutions
Generally, the Python Circular Import problem occurs when you accidentally name your working file the same as the module name and those...
Read more >Why cyclic dependency errors occur - a look into the Python ...
In simplest terms, a circular import occurs when module A tries to import and use an object from module B, while module B...
Read more >Python Circular Imports Module: Solving Circular Import Problem
Python Circular Imports is a type of Circular dependency. It occurs in python when two or more models import each other and it...
Read more >So you got a circular import in Python. | by Hadrien Hamana
You're just done writing code and you launch your app to see how it works; Here it is, you see this dreaded circular...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
CI runs from the root folder of the repository.
@arunppsg So, how does CI run the doctests? Hope it is the same way as you told me to do.