manusimidt / py-xbrl

Python-based parser for parsing XBRL and iXBRL files
https://py-xbrl.readthedocs.io/en/latest/
GNU General Public License v3.0
100 stars 37 forks source link

maximum recursion depth exceeded in __instancecheck__ #127

Closed keyboardcrimp closed 1 month ago

keyboardcrimp commented 4 months ago

Is there anyway to increase the recursion depth? I keep running into this issue, I don't mind if it takes a bit longer to process a file but I'd prefer for the action to finish rather than erroring out.

manusimidt commented 4 months ago

Hey @keyboardcrimp, are you working on an XBRL Instance file you can share? Because it sounds like a bug, normally the XBRL document should not be so deep that there are any recursion depth issues.

keyboardcrimp commented 4 months ago

Hi @manusimidt thanks for getting back to me on this. Sure, so I'm trying to download and parse some balance sheets from companies house and having a fair number of them fail on recursion errors. If you want to replicate it there's a link here to download a zip containing a days worth of balance sheets:

https://download.companieshouse.gov.uk/Accounts_Bulk_Data-2024-02-24.zip

And here are all the ones I noted that failed on recursion:

manusimidt commented 3 months ago

Hey @keyboardcrimp thanks for providing the filings. I will have a look into it.

manusimidt commented 1 month ago

Fixed in #133 I tested it with Prod223_3641_11717742_20230630.html which now works without issues. Will release a new version containing this fix soon. Thanks @Sam-el0