'Module 'xml.dom' has no attribute 'Node'

I wanted to use the module xml in Python 3.7, however i am getting the following error :

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> from xml.dom import minidom
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    from xml.dom import minidom
  File "C:\Users\EMurairi18\AppData\Local\Programs\Python\Python37-32\lib\xml\dom\minidom.py", line 30, in <module>
    _nodeTypes_with_children = (xml.dom.Node.ELEMENT_NODE,
AttributeError: module 'xml.dom' has no attribute 'Node'
>>> 

What is wrong with this ?



Solution 1:[1]

Tried to replicate the error installing python3.7.0, but it's all working fine. Maybe there were conflicting packages in that installation (which could be prevented by managing dependencies within a python virtual environment, or any similar option), or maybe the issue is fixed if there was any.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Emmanuel Murairi