Python: module file name conflicts with the package name

I have a python module file named, in the module

import xml.etree.ElementTree as ET
... ...
When executing the file, it raises the following error:

ImportError: No module named etree.ElementTree
According the stackoverflow post, it was caused by the moudle file name, rename the to something else resolved the issue.

No comments:

Post a Comment