Skip to content
New issue

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

Infinite recursion loops with cyclic taxonomy imports. #130

Closed
Sam-el0 opened this issue Apr 1, 2024 · 2 comments · Fixed by #133
Closed

Infinite recursion loops with cyclic taxonomy imports. #130

Sam-el0 opened this issue Apr 1, 2024 · 2 comments · Fixed by #133

Comments

@Sam-el0
Copy link
Contributor

Sam-el0 commented Apr 1, 2024

When certain xbrl documents are parsed, it results in a:

RecursionError: maximum recursion depth exceeded while calling a Python object

From debugging, it looks like this is due to cyclic taxonomy imports. For example, in file Accounts_Bulk_Data-2024-02-24/Prod223_3641_06621976_20230331.html from @keyboardcrimp's issue [here] (#127), the schema https://xbrl.frc.org.uk/fr/2022-01-01/core/frc-core-2022-01-01.xsd imports https://xbrl.frc.org.uk/dpl/2022-01-01/dpl-2022.xsd which imports https://xbrl.frc.org.uk/fr/2022-01-01/core/frc-core-2022-01-01.xsd, creating a infinite loop.

I quick fixed this by passing a set into the parse_taxonomy from parse_ixbrl and adding import_uris, checking that they have not already been imported. Not sure on your contribution policy but I can put in a PR.

Cheers,
Sam

@manusimidt
Copy link
Owner

Hey @Sam-el0 , contributions via PR are always highly appreciated! :)
I will also have a look into the problem

@manusimidt
Copy link
Owner

Hey @Sam-el0, thanks a lot for PR #133! I will have a look

@manusimidt manusimidt linked a pull request May 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants