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

TypeError: '_io.TextIOWrapper' object is not callable

Open sagarsea opened this issue 5 years ago • 1 comments

Great library, but I need help with the following error when executing my code for filename in reversed(filelist): print("filename", filename) # print("index", index) this_file = {} thisfilename = os.path.join(this_path, filename) with open(thisfilename, 'r', encoding='utf-8') as file: print(thisfilename) this10q = file.read() xbrl_parser = XBRLParser() xbrl = xbrl_parser.parse(file(thisfilename))

Error message is detailed below : Traceback (most recent call last): File "C:/Users/sagar/Documents/DEAR/analysis-automation-master/my-analyzer/secfilingextraction.py", line 21, in <module> xbrl = xbrl_parser.parse(file(thisfilename)) TypeError: '_io.TextIOWrapper' object is not callable

sagarsea avatar Feb 23 '20 01:02 sagarsea

https://stackoverflow.com/questions/33421209/typeerror-io-textiowrapper-object-is-not-callable-creating-text-file-error

Masoud-Karami avatar May 23 '20 20:05 Masoud-Karami