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

Parsing error on AAPL's most recent filing. #13

Open
greedo opened this issue Dec 15, 2014 · 3 comments
Open

Parsing error on AAPL's most recent filing. #13

greedo opened this issue Dec 15, 2014 · 3 comments
Assignees

Comments

@greedo
Copy link
Owner

greedo commented Dec 15, 2014

Parsing error is occurring with
http://www.sec.gov/Archives/edgar/data/320193/000119312514383437/aapl-20140927.xml

xbrl = XBRLParser.parse(file("aapl-20140927.xml"))

And this is the error I get back:
AttributeError Traceback (most recent call last)
in ()
----> 1 xbrl = XBRLParser.parse(file("aapl-20140927.xml"))

C:\Users\PJE\AppData\Local\Enthought\Canopy32\User\lib\site-packages\xbrl\xbrl.pyc in parse(self, file_handle)
76 # lookahead to see if we need a custom leading element
77 lookahead = xbrl.find(name=re.compile("context",
---> 78 re.IGNORECASE | re.MULTILINE)).name
79 if ":" in lookahead:
80 self.xbrl_base = lookahead.split(":")[0] + ":"

AttributeError: 'NoneType' object has no attribute 'name'

@greedo greedo self-assigned this Dec 15, 2014
@greedo greedo added the bug label Dec 18, 2014
@greedo
Copy link
Owner Author

greedo commented Dec 21, 2014

Issue appears to be fixed now.

@greedo greedo closed this as completed Jan 5, 2015
@lhsu1
Copy link

lhsu1 commented Feb 5, 2016

I just got this exact error! how did you fix it? @greedo

@greedo greedo reopened this Feb 8, 2016
@greedo greedo added the question label Feb 8, 2016
@SushantReddy
Copy link

I just downloaded this package and tried running the gaap.py. I keep getting the AttributeError - can you please tell me what I'm missing here. Installed all packages and everything looks in order..

Attached is the error message:

C:\Python27\python.exe C:/Learning/PythonWorkspace/projects/xbrlBaba/examples/gaap.py
Traceback (most recent call last):
File "C:/Learning/PythonWorkspace/projects/xbrlBaba/examples/gaap.py", line 9, in
xbrl = xbrl_parser.parse(file("../tests/sam-20130629.xml"))
File "C:\Learning\PythonWorkspace\projects\xbrlBaba\xbrl\xbrl.py", line 80, in parse
re.IGNORECASE | re.MULTILINE)).name
AttributeError: 'NoneType' object has no attribute 'name'

Process finished with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants