Aug-30-2017, 06:59 AM
Thank you very much. I updated the script with your code. I did receive the below error (which I think you were expecting to see as indicated in your earlier post)
Error:
Line 149 in script is:
Error:
Quote:Warning: An error occured while processing Python script 'file:///Users/ivanstamenkovic/Desktop/SEC/extractRatios.py'!
Reason: TypeError: can only concatenate list (not "str") to list
Details:
python-traceback: File "/Users/ivanstamenkovic/Desktop/SEC/extractRatios.py", line 149, in on_xbrl_valid
ratiofile.write( tradingSymbol + "," + entityRegistrantName + "," + entityCentralIndexKey + "," + currentFiscalYearEndDate + "," + docType + "," + documentPeriodEndDate + "," + documentFiscalYearFocus + "," + documentFiscalPeriodFocus + "," + entityCommonStockSharesOutstanding + "," + documentCreationDate + "," + commonStockSharesIssued + "," + treasuryStockShares + "," + commonStockSharesOutstanding + "\n")
python-error: An error occured while processing Python script 'file:///Users/ivanstamenkovic/Desktop/SEC/extractRatios.py'!
Line 149 in script is:
ratiofile.write( tradingSymbol + "," + entityRegistrantName + "," + entityCentralIndexKey + "," + currentFiscalYearEndDate + "," + docType + "," + documentPeriodEndDate + "," + documentFiscalYearFocus + "," + documentFiscalPeriodFocus + "," + entityCommonStockSharesOutstanding + "," + documentCreationDate + "," + commonStockSharesIssued + "," + treasuryStockShares + "," + commonStockSharesOutstanding + "\n")Do you have any suggestions? I will also read the Python standard module (CSV writing 14.1) in case I can find how to fix.