We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I was using the package with the xbrl.zip file from:
https://www.sec.gov/Archives/edgar/data/320193/000119312510238044
Afterwards I tested the code from the "test-parse.py" file.
However, the last parser.parseMainXBRL(txt) throws the following error:
parser.parseMainXBRL(txt)
KeyError Traceback (most recent call last) in 1 with open(os.path.join(folder, main_data_f)) as f: 2 txt = f.read() --> 3 ctx_elems, data_elems = parser.parseMainXBRL(txt) 4 5 print("parsing result: ")
c:\users\edgar api\src\py-sec-xbrl\pysecxbrl\parsing.py in parseMainXBRL(self, text) 14 #main_elems = root.findall(".//dei:DocumentType",namespaces=root.nsmap) 15 # print(len(main_elems)) --> 16 data_elems = self.getDataElementsAsDict(root) 17 ctx_elems = self.getContextElementsAsDict(root) 18
c:\users\edgar api\src\py-sec-xbrl\pysecxbrl\parsing.py in getDataElementsAsDict(self, tree) 43 item[attr] = elem.attrib[attr] 44 --> 45 res[elem.attrib["id"]] = item 46 47 return res
src\lxml\etree.pyx in lxml.etree._Attrib.getitem()
KeyError: 'id'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I was using the package with the xbrl.zip file from:
https://www.sec.gov/Archives/edgar/data/320193/000119312510238044
Afterwards I tested the code from the "test-parse.py" file.
However, the last
parser.parseMainXBRL(txt)
throws the following error:KeyError Traceback (most recent call last)
in
1 with open(os.path.join(folder, main_data_f)) as f:
2 txt = f.read()
--> 3 ctx_elems, data_elems = parser.parseMainXBRL(txt)
4
5 print("parsing result: ")
c:\users\edgar api\src\py-sec-xbrl\pysecxbrl\parsing.py in parseMainXBRL(self, text)
14 #main_elems = root.findall(".//dei:DocumentType",namespaces=root.nsmap)
15 # print(len(main_elems))
--> 16 data_elems = self.getDataElementsAsDict(root)
17 ctx_elems = self.getContextElementsAsDict(root)
18
c:\users\edgar api\src\py-sec-xbrl\pysecxbrl\parsing.py in getDataElementsAsDict(self, tree)
43 item[attr] = elem.attrib[attr]
44
--> 45 res[elem.attrib["id"]] = item
46
47 return res
src\lxml\etree.pyx in lxml.etree._Attrib.getitem()
KeyError: 'id'
The text was updated successfully, but these errors were encountered: