AttributeError: partially initialized module has no attribute…(Python)

Python AttributeError: partially initialized module

Less of a blog post and more of a reminder to myself that when Python says:

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

It is normally because I have named my Python file the same as the module I am importing and caused a circular reference. In this case I am looking at using the Python logging module and saved my Python file as logging.py, so when I then imported logging and tried to call on its functions it failed.

Python AttributeError: partially initialized module
Python AttributeError: partially initialized module

The solution is not to name the Python file the same as any of the modules being imported in that Python file.