Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Script having problems

Hello -- I'm having an issue that pops up when I run UpdatePSData.bat.
It says it cannot find "TransactionsInExcel.csv", and "Symbol.csv".
Where do these csv files come from?


I do not see these files in the PSdata (I call it PSdataNEW) folder. Any idea? Partial error log below and attached.

Error log from PSData file;
Symbol '* Cash' in Quotes.csv but not in Symbol.csv
Symbol 'AMZN' in Quotes.csv but not in Symbol.csv
Symbol 'BND' in Quotes.csv but not in Symbol.csv
....

Comments

  • Error is "Please specify ExcelSource parameter in psConfig.txt.

    If you are using old (v2.x) psConfig.txt, then add following lines to your psConfig.txt, but change your actual file location:
    <ExcelSourceFile>
    C:\MyFolder\Dropbox\PortfolioSlicer\PortfolioSlicer-Source.xlsx
    </ExcelSourceFile>
    
  • Vidas -- Thank you Sir! This was something I overlooked.
    FWIW, I am using the most recent version and the yahoo script that comes w/ Ver 3.1 does not work. I copied the three yahoo based scripts from the DDM V3 download in place of what came with Ver 3.1 and now it is working, unsure what is causing the failure.

    I'll now copy over all my data and see what happens. Fingers crossed.
  • I bought a new computer and Portfolio Slicer does not work anymore.
    When I clicked on "UpdatePSData", I got this error message:


    C:\PortfolioSlicer\Scripts>echo off
    Invoke-WebRequest : if(window!=window.top){document.write('

    Content is currently
    unavailable.

    image');}else{window.location.replace('https://www.yahoo.com/?err=404&err_url=http
    s%3A%2F%2Fbrb.yahoo.net%3A443%2Ffinance.yahoo.com%2Fdesktop%2Fquote%2FAAPL%2Fhistory%2Findex.html');}
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:20 char:17
    + ... $wrCookie = Invoke-WebRequest -Uri $urlCookie -SessionVariable webses ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
    eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
    You cannot call a method on a null-valued expression.
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:22 char:5
    + $crumbStart = $webCookie.IndexOf($crumbStr); if ($crumbStart -eq ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    You cannot call a method on a null-valued expression.
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:23 char:5
    + $crumb = $webCookie.Substring($crumbStart+$crumbStr.Length,100); ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    Exception calling "Substring" with "2" argument(s): "Length cannot be less than zero.
    Parameter name: length"
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:25 char:5
    + $crumb = $crumb.Substring(0, $crumbEnd); # ================ At ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentOutOfRangeException

    Invoke-WebRequest : The remote server returned an error: (404) Not Found.
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:20 char:17
    + ... $wrCookie = Invoke-WebRequest -Uri $urlCookie -SessionVariable webses ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
    eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

    You cannot call a method on a null-valued expression.
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:22 char:5
    + $crumbStart = $webCookie.IndexOf($crumbStr); if ($crumbStart -eq ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    You cannot call a method on a null-valued expression.
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:23 char:5
    + $crumb = $webCookie.Substring($crumbStart+$crumbStr.Length,100); ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    Exception calling "Substring" with "2" argument(s): "Length cannot be less than zero.
    Parameter name: length"
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:25 char:5
    + $crumb = $crumb.Substring(0, $crumbEnd); # ================ At ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentOutOfRangeException

    Invoke-WebRequest : if(window!=window.top){document.write('

    Content is currently
    unavailable.

    image');}else{window.location.replace('https://www.yahoo.com/?err=404&err_url=http
    s%3A%2F%2Fbrb.yahoo.net%3A443%2Ffinance.yahoo.com%2Fdesktop%2Fquote%2FAAPL%2Fhistory%2Findex.html');}
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:20 char:17
    + ... $wrCookie = Invoke-WebRequest -Uri $urlCookie -SessionVariable webses ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
    eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
    You cannot call a method on a null-valued expression.
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:22 char:5
    + $crumbStart = $webCookie.IndexOf($crumbStr); if ($crumbStart -eq ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    You cannot call a method on a null-valued expression.
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:23 char:5
    + $crumb = $webCookie.Substring($crumbStart+$crumbStr.Length,100); ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    Exception calling "Substring" with "2" argument(s): "Length cannot be less than zero.
    Parameter name: length"
    At C:\PortfolioSlicer\Scripts\Scripts\GetQuotes-Yahoo.ps1:25 char:5
    + $crumb = $crumb.Substring(0, $crumbEnd); # ================ At ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentOutOfRangeException

    22:25:01 Script: Yahoo Historical . Quotes Requested/Succeed/Failed/Rows: 155/0/155/0. Duration: 14 sec.
    22:25:16 Script: Yahoo Intraday . Quotes Requested/Received/Used : 155/0/0. Quote time: . Duration: 0 sec.
    22:25:21 Script: ExchRate Stooq . CurrExch Requested/Succeed/Failed/Rows: 2/0/2/0. Duration: 2 sec.
    22:25:25 Script: Archive Quotes . Archived rec count: 0. Duration:
    22:25:29 Script: Create Dates . Dates: 3610. Duration: 0 sec.
    22:25:30 Script: Append GenQ . GenQuotes SymbolCount/RecCount: 0/0. Duration: 0 sec.
    22:25:31 Script: CheckFiles . Duration: 1 sec.
    ***** Generated PS files were checked - no issues found *****
  • Mat,

    I think that you are using an old GetQuotes-Yahoo.ps1 script file.

    Go to the Downloads page and get an updated file from the link in the "Download Scripts to extract and manage external data" section. Then replace the GetQuotes-Yahoo.ps1 file that you have with the new one and try again.
  • @Trenzalore right - after downloading ALL scripts, you also need to download updated external management scripts and that should fix the errors you have.
  • I have the following error messages. Please help!


    01:26:37 --- Starting script psCheckFiles.ps1
    01:26:37 File Dates.csv. Record count: 3646
    Dates.csv. Row count - must be at least 2 (header and at least one date) - OK
    Dates.csv. First row (file header) should be 'Date' - OK
    Dates.csv. All but first row (header) should be in format YYYY-MM-DD - OK
    Dates.csv. Minimum date in file should be configured MinDate - OK (2014-12-31)
    Dates.csv. Maximum date in file should be today - OK (2024-12-22)
    Dates.csv. Dates should be unique - OK
    01:26:37 File Dates.csv check completed. No issues found.
    01:26:37 File Quotes.csv. Record count: 21870
    Quotes.csv. Row count - must be at least 2 (header and at least one record) - OK
    Quotes.csv. First row (file header) should be 'Date Close Symbol' - OK
    Quotes.csv. Each row should have exactly two column separators (' ') - OK
    Quotes.csv. All rows should have 'Date' column in format YYYY-MM-DD - OK
    Quotes.csv. Minimum date in file should be after configured MinDate - OK (2014-12-31)
    Quotes.csv. Maximum date in file should be today or before - OK (2024-12-20)
    Quotes.csv. Date+Symbol should be unique - OK
    01:26:38 File Quotes.csv check completed. No issues found.
    01:26:38 File Dividends.csv. Record count: 2
    Dividends.csv. Row count - must be at least 1 (header) - OK
    Dividends.csv. First row (header) should be 'PayDate DividendPerShare Symbol' - OK
    Dividends.csv. Each row should have exactly two column separators (' ') - OK
    Dividends.csv. All rows should have 'PayDate' column in format YYYY-MM-DD - OK
    Dividends.csv. Minimum date in file should be configured MinDate - OK (2014-12-31)
    Dividends.csv. Maximum date in file should be today or before - OK (2014-12-31)
    Dividends.csv. Date+Symbol should be unique - OK
    01:26:38 File Dividends.csv check completed. No issues found.
    01:26:38 File CurrencyConv.csv. Record count: 5168
    CurrencyConv.csv. Row count - must be at least 1 (header) - OK
    CurrencyConv.csv. First row should be 'Date ExchRate CurrencyFrom CurrencyTo' - OK
    CurrencyConv.csv. Each row should have exactly three column separators (' ') - OK
    CurrencyConv.csv. All rows should have 'Date' column in format YYYY-MM-DD - OK
    CurrencyConv.csv. Minimum date in file should be configured MinDate - OK (2014-12-31)
    CurrencyConv.csv. Maximum date in file should be today or before - OK (2024-12-22)
    CurrencyConv.csv. Date+CurrencyFrom+CurrencyTo should be unique - OK
    01:26:38 File CurrencyConv.csv check completed. No issues found.
    Symbol '* Cash' in Quotes.csv but not in Symbol.csv
    Symbol 'ACWV' in Quotes.csv but not in Symbol.csv
    Symbol 'AGG' in Quotes.csv but not in Symbol.csv
    Symbol 'AI.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'ALA.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'AOA' in Quotes.csv but not in Symbol.csv
    Symbol 'AOM' in Quotes.csv but not in Symbol.csv
    Symbol 'AOR' in Quotes.csv but not in Symbol.csv
    Symbol 'AQN.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'BCE.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'BCE' in Quotes.csv but not in Symbol.csv
    Symbol 'BEI-UN.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'BEP-UN.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'BINC' in Quotes.csv but not in Symbol.csv
    Symbol 'BIP-UN.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'BND' in Quotes.csv but not in Symbol.csv
    Symbol 'BNS.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'BPY-UN.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'BRK-B' in Quotes.csv but not in Symbol.csv
    Symbol 'BXMT' in Quotes.csv but not in Symbol.csv
    Symbol 'HSAV.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'HSBC' in Quotes.csv but not in Symbol.csv
    Symbol 'HXE.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'HXS.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'HXT.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'IAU' in Quotes.csv but not in Symbol.csv
    Symbol 'IBIT' in Quotes.csv but not in Symbol.csv
    Symbol 'IGF' in Quotes.csv but not in Symbol.csv
    Symbol 'IPL.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'ITOT' in Quotes.csv but not in Symbol.csv
    Symbol 'IXP' in Quotes.csv but not in Symbol.csv
    Symbol 'IXUS' in Quotes.csv but not in Symbol.csv
    Symbol 'JXI' in Quotes.csv but not in Symbol.csv
    Symbol 'KILO.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'KRE' in Quotes.csv but not in Symbol.csv
    Symbol 'MKP.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'MMP' in Quotes.csv but not in Symbol.csv
    Symbol 'MSFT' in Quotes.csv but not in Symbol.csv
    Symbol 'NVU-UN.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'OKE' in Quotes.csv but not in Symbol.csv
    Symbol 'PPL.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'PRQ.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'PSA.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'PSU-U.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'REI-UN.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'REM' in Quotes.csv but not in Symbol.csv
    Symbol 'RIT.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'RUF-un.V' in Quotes.csv but not in Symbol.csv
    Symbol 'RY.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'RY' in Quotes.csv but not in Symbol.csv
    Symbol 'SEP' in Quotes.csv but not in Symbol.csv
    Symbol 'SHYG' in Quotes.csv but not in Symbol.csv
    Symbol 'STB.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'T.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'TD.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'TF.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'TOG.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'TRP.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'TRP' in Quotes.csv but not in Symbol.csv
    Symbol 'T' in Quotes.csv but not in Symbol.csv
    Symbol 'USRT' in Quotes.csv but not in Symbol.csv
    Symbol 'VAB.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'VBAL.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'VBU.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'VCE.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'VCIT' in Quotes.csv but not in Symbol.csv
    Symbol 'VCN.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'VCNS.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'VDY.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'VEE.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'VEQT.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'VFH' in Quotes.csv but not in Symbol.csv
    Symbol 'VFV.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'VGH.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'VGRO.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'XSB.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'XSH.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'XSP.TO' in Quotes.csv but not in Symbol.csv
    Symbol 'XUS.TO' in Quotes.csv but not in Symbol.csv
    Symbol '^GSPC' in Quotes.csv but not in Symbol.csv
    Symbol '^GSPTSE' in Quotes.csv but not in Symbol.csv
    Symbol '* Cash' in Dividends.csv but not in Symbol.csv
    Symbol '* Cash' in CompareTo.csv but not in Symbol.csv
    Symbol '* Cash' in SymbolAllocation.csv but not in Symbol.csv
    Symbol '* Cash' in SymbolSector.csv but not in Symbol.csv
    CurrencyFrom 'CAD' in CurrencyConv.csv but not in ReportCurrency.csv
    CurrencyFrom 'USD' in CurrencyConv.csv but not in ReportCurrency.csv
    CurrencyTo '' in CurrencyConv.csv but not in ReportCurrency.csv
    CurrencyTo '' in CurrencyConv.csv but not in ReportCurrency.csv
    01:26:39 --- Finished. Duration: 2 sec.
    =======================================================================================

    Your script version is: 3.0.1, Online script version is: N/A
  • In folder c:\PortfolioSlicer\PSData please check file Symbol.csv.
    If file does not exists, then likely you have issues with script GetExcelSrcData.ps1
    If file exists, can you please post here first 10 lines of that file.
Sign In or Register to comment.