python-xbrl icon indicating copy to clipboard operation
python-xbrl copied to clipboard

Parsing error on AAPL's most recent filing.

Open greedo opened this issue 11 years ago • 3 comments

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 avatar Dec 15 '14 14:12 greedo

Issue appears to be fixed now.

greedo avatar Dec 21 '14 02:12 greedo

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

lhsu1 avatar Feb 05 '16 21:02 lhsu1

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

SushantReddy avatar May 18 '16 03:05 SushantReddy