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

parseGAAP() got an unexpected keyword argument 'doc_type' #41

Open
hwypengsir opened this issue Feb 12, 2017 · 1 comment
Open

parseGAAP() got an unexpected keyword argument 'doc_type' #41

hwypengsir opened this issue Feb 12, 2017 · 1 comment
Assignees

Comments

@hwypengsir
Copy link

Python 3.6.0 (default, Feb 11 2017, 14:54:45)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.

from xbrl import XBRLParser, GAAP, GAAPSerializer
xbrl_parser = XBRLParser()
xbrl = xbrl_parser.parse('aapl-20150627.xml')
gaap_obj = xbrl_parser.parseGAAP(xbrl, doc_date='20150627', doc_type='10-Q', context='current')
Traceback (most recent call last):
File "", line 1, in
TypeError: parseGAAP() got an unexpected keyword argument 'doc_type'

How to fix it?

@hwypengsir
Copy link
Author

hwypengsir commented Feb 12, 2017

To delete the doc_type='10-Q', ,issue solved on my platform:debian8+python3.6.

Is the parameter doc_type='10-Q' or doc_type='10-K' abandoned in latest python-xbrl version?

from xbrl import XBRLParser, GAAP, GAAPSerializer
xbrl_parser = XBRLParser()
xbrl = xbrl_parser.parse('aapl-20150627.xml')
gaap_obj = xbrl_parser.parseGAAP(xbrl, doc_date='20150627',context='current')
serializer = GAAPSerializer()
result = serializer.dump(gaap_obj)
print(result)

MarshalResult(data={'comprehensive_income_interest': 0.0, 'temporary_equity': 0.0, 'noncurrent_liabilities': 0.0, 'income_tax_expense_benefit': 3796.0, 'net_cash_flows_investing_continuing': 0.0, 'net_income_loss_noncontrolling': 0.0, 'cost_of_revenue': 0.0, 'operating_income_loss': 0.0, 'interest_and_debt_expense': 0.0, 'net_cash_flows_discontinued': 0.0, 'income_from_equity_investments': 0.0, 'costs_and_expenses': 0.0, 'comprehensive_income_parent': 9065.0, 'non_current_assets': 4081.0, 'net_cash_flows_operating_discontinued': 0.0, 'other_operating_income': 0.0, 'net_income_parent': 0.0, 'net_cash_flows_operating': 0.0, 'net_cash_flows_investing_discontinued': 0.0, 'common_shares_authorized': 0.0, 'current_assets': 70953.0, 'equity_attributable_interest': 0.0, 'common_shares_issued': 0.0, 'commitments_and_contingencies': 0.0, 'preferred_stock_dividends': 0.0, 'assets': 273151.0, 'equity': 0.0, 'stockholders_equity': 125677.0, 'liabilities': 65285.0, 'gross_profit': 19681.0, 'equity_attributable_parent': 0.0, 'nonoperating_income_loss': 0.0, 'net_cash_flows_investing': 0.0, 'common_shares_outstanding': 0.0, 'revenue': 0.0, 'net_income_loss': 10677.0, 'extraordary_items_gain_loss': 0.0, 'net_income_shareholders': 0.0, 'comprehensive_income': 9065.0, 'income_loss': 14083.0, 'net_cash_flows_financing_continuing': 0.0, 'income_before_equity_investments': 0.0, 'other_comprehensive_income': 0.0, 'redeemable_noncontrolling_interest': 0.0, 'net_cash_flows_operating_continuing': 0.0, 'net_cash_flows_financing': 0.0, 'current_liabilities': 0.0, 'operating_expenses': 5598.0, 'liabilities_and_equity': 273151.0}, errors={})

@greedo greedo self-assigned this May 19, 2017
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

No branches or pull requests

2 participants