Comments (6)
This would affect mainly the instance module, but there both XBRL and iXBRL parsing is affected since these are separate functions.
from py-xbrl.
Hi,
Thanks for the idea, I did some code changes, added a try catch block as you suggested and used beautiful soup to fetch the wrongly filed data from the XML file directly.
Here is my code:
try:
concept: Concept = tax.concepts[tax.name_id_map[concept_name]]
context: AbstractContext = context_dir[fact_elem.attrib['contextRef'].strip()]
except KeyError:
print(f"\nAll facts with concept \t" + concept_name + "\t will be ignored, due to invalid concept definition\n")
#print (f"this is the path \n", instance_path)
from bs4 import BeautifulSoup
file = open(instance_path,"r", encoding="utf-8")
contents = file.read()
soup = BeautifulSoup(contents, 'xml')
tag_list = soup.find_all()
for tag in tag_list:
if tag.name == concept_name:
print("This is the wrongly filed concept :\n" + concept_name + "\nThis is it's data:\n" + tag.text)
continue
Now, i am getting the values on terminal, sure. But the final result is in dataframe,
How do i append this result to the final dataframe? can you please help?
(this is my terminal result hope you are able to see this)
Thanks and regards.
from py-xbrl.
Is there a way where i can integrate this result for wrongly filed concept names and add them to the "facts"
There seem to be many changes in parameters of the functions so I would rather wait for you to give an update regarding this.
Thanks
from py-xbrl.
This change is now live in version 2.2.0
from py-xbrl.
This could also apply to context id's (see #86)
from py-xbrl.
Related Issues (20)
- Need path or reference to source file of a Linkbase HOT 2
- Standardised Financial Data HOT 5
- Equals method for all fact classes HOT 1
- Solution to frequently missing taxonomy specifications in UK submissions HOT 21
- Parsing Failures for Empty Fact Values and 'nil' Text in XBRL Documents HOT 2
- Support a New Taxonomy? HOT 1
- Parsing filings with empty imports HOT 3
- "Explicit Member"s missing HOT 3
- Add support for Datetime in context duration. HOT 3
- KeyError: 'Unit_sqft' HOT 2
- Add support for the ixt-sec transformations. HOT 1
- unresolved schemas HOT 12
- Not well-formed (invalid token) error for ixblr. HOT 11
- parse_ixbrl should add encoding argument HOT 2
- New 2022 taxonomies HOT 4
- Bug: instance.json('my-file.json') HOT 1
- Unclear +/- sign of some facts HOT 17
- Space in url creates issues when requesting a taxonomy
- Potential arg bug in transformations __init__ HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-xbrl.