KeyError: 'OneD' - Error while importing the xbrl xml file content from nseindia.com #86
Replies: 4 comments 1 reply
-
Hey 🙋🏼♂️, This error is expected because the filing 'INDAS_87322_682638_08072022082614_WEB.xml' is simply not valid. It seems to me that a lot of Indian submissions have semantic errors... I will have a look into it, maybe we should just throw a warning instead of an error (like already implemented #84) |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, i am not even able to download the taxonomy schema. <link:schemaRef xlink:type="simple" xlink:href="Ind-AS_entry_point_2020-03-31.xsd"/> However, when trying to download |
Beta Was this translation helpful? Give feedback.
-
Hi Manuel,
Thank you for investigating this issue. A oneD can be considered as one
dimension data or table. Yes we can ignore the error and show it as
warning. Please suggest the solution and provide updated libraries.
Thanks and regards,
Sunil
…On Sun, 21 Aug 2022, 18:15 Manuel Schmidt, ***@***.***> wrote:
Hey 🙋🏼♂️,
This error is expected because the filing
'INDAS_87322_682638_08072022082614_WEB.xml' is simply not valid.
They use a context with ID 'OneD' that was never defined. (No context with
id='OneD' exist in the instance document).
Thus this file is simply no valid XBRL file.
It seems to me that a lot of Indian submissions have semantic errors...
I will have a look into it, maybe we should just throw a warning instead
of an error (like already implemented #84
<#84>)
—
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARE2D4PKDV5S4QDXRHROJZDV2IQIHANCNFSM57BNGAQQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello @manusimidt , @sunilfussey , and @PotatoProgrammer20 (from the earlier post) Similar to the your note above for I tried to find the both the entry point xsd but could not, however, I have found some schema, not sure if these can help. attached in the zip here. Ref1 : https://in.xbrl.org/about-us/xbrl-taxonomies/ hope this can help solving it further. there are some business rules as well, which define the dimension/Business Rules as mentioned above. Ref5 : https://www.mca.gov.in/Ministry/pdf/Final_Business_Rule_C&I_Taxonomy_2016_V1.3.zip |
Beta Was this translation helpful? Give feedback.
-
I get KeyError: 'OneD' while importing the xbrl xml file content from nseindia.com. I am trying to import or fetch financial result data available on nseindia.com. Please help me on fixing the below issue. syntax and error message given below and also attached herewith. I tried to download relevant xsd files and tried to execute it. Now I am getting Keyerror OneD error.
import logging
from xbrl.cache import HttpCache
from xbrl.instance import XbrlParser, XbrlInstance
logging.basicConfig(level=logging.INFO)
cache: HttpCache = HttpCache('./cache')
cache.set_headers({'From': '[email protected]', 'User-Agent': 'py-xbrl/2.1.0'})
parser = XbrlParser(cache)
schema_url = "https://archives.nseindia.com/corporate/xbrl/INDAS_87322_682638_08072022082614_WEB.xml"
inst: XbrlInstance = parser.parse_instance(schema_url)
_**Traceback (most recent call last):
File "", line 12, in
inst: XbrlInstance = parser.parse_instance(schema_url)
File "C:\anaconda3\lib\site-packages\xbrl\instance.py", line 722, in parse_instance
return parse_xbrl_url(uri, self.cache) if uri.startswith('http') else parse_xbrl(uri, self.cache, instance_url)
File "C:\anaconda3\lib\site-packages\xbrl\instance.py", line 329, in parse_xbrl_url
return parse_xbrl(instance_path, cache, instance_url)
File "C:\anaconda3\lib\site-packages\xbrl\instance.py", line 395, in parse_xbrl
context: AbstractContext = context_dir[fact_elem.attrib['contextRef'].strip()]
KeyError: 'OneD'**_
I had tried to download some of the taxonomy from below location to solve missing xsd error.
https://www.bseindia.com/static/about/xbrl_info.aspx#!#abtxbrl
and also from https://www.xbrl.org/
https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd
etc.
Many many thanks for guidance.
Beta Was this translation helpful? Give feedback.
All reactions