I have built this code to specifically identify a load of .XML files and to extract co-ordinates from those files. Here is my code:
from xml.etree import Element
Maybe you just need to write the file path with \ instead of /:
\
/
workspace = "D:\\J040083"
Or, without backslash escaping as a raw string:
workspace = r"D:\J040083"