osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xml File Error


Hi,

import os from xml.etree import ElementTree
file_name = 'Users.xml' full_file = os.path.abspath(os.path.join('data',
file_name)) print(full_file) with above code, path is successfully printed
as "C:\Users\Evosys\PycharmProjects\Python Level1\data\Users.xml" but when
I add below 2 lines, there is an error saying "FileNotFoundError: [Errno 2]
No such file or directory: 'C:\\Users\\Evosys\\PycharmProjects\\Python
Level1\\data\\Users.xml' dom = ElementTree.parse(full_file,None) print(dom) Can
you suggest to me why I am facing the error?

-- 
Regards,

Dipangi Shah