AR-k12code / CognosDownloader

MIT License
2 stars 3 forks source link

CSV Verification / Empty File when "Report is still working." #36

Open jarspider opened 2 years ago

jarspider commented 2 years ago

Using the downloader from the Dev branch, when a report writes "Info: Report is still working." The report gives a CSV Verification Error. If you bypass the error, you get a completely blank file. It's happened on multiple reports, first time I've tried it with my more complex ones. Error Transcript below:

Authenticating and switching to ___... Success. Attempting to retrieve report details for Data-Horizon-Rpt... Success. Retrieving possible formats... Success. - Data-Horizon-Rpt (i0D1D5BD27C3D4E1E87ABB371AF304583) can be exported in the following formats: CSV,PDF,spreadsheetML,XLWA,xlsxData,XML,MHT Deleting old Data-Horizon-Rpt...Success. Renaming old Data-Horizon-Rpt... Success. Downloading Report to "C:\Users\ssmin\Scripted-Imports\CognosReports\Data-Horizon-Rpt.csv"... Info: Report is still working. Success. Get-Member: C:\Users\ssmin\Scripted-Imports\CognosDownload.ps1:717:45 Line | 717 | $headercount = ($fileContents | Get-Member | Where-Object … | ~~ | You must specify an object for the Get-Member cmdlet.

Failed CSV header check with only 0 headers... Deleting old Data-Horizon-Rpt...Success. Reversing old Data-Horizon-Rpt.

carbm1 commented 2 years ago

The dev branch is currently broken. I've given up on making a single script work for both Powershell 5 and 7.

I'm working on some new code that hopefully I will be pushing out soon that will address the differences.