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.
Sign In or Register to comment.