Howdy, Stranger!

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

Quotes not downloading

Help please. I noted the error messages below and my quotes are not updating. What happened?
I attached the log in Word.

Below are the excerpt, as the full file is too long to post:


C:\PortfolioSlicer\Scripts>echo off
07:37:58 Script: Yahoo Historical . Quotes Requested/Succeed/Failed/Rows: 2/2/0/0. Duration: 1 sec.
07:37:59 Script: Yahoo Intraday . Quotes Requested/Succeed/Failed/Rows: 2/2/0/2. Duration: 0 sec.
07:38:03 Script: ExchRate ECB . CurrExch Requested/Succeed/Failed/Rows: 2/2/0/0. Duration: 4 sec.
07:38:09 Script: ExchRate YahooID . CurrExch Requested/Succeed/Failed/Used: 2/2/0/2. Date: . Duration: 1 sec.
07:38:11 Script: Archive Quotes . Archived rec count: 0. Duration:
07:38:13 Script: MakeAllFiles Finished creating all data files. Duration: 2 sec.
07:38:16 Script: Create Dates . Dates: 4272. Duration: 0 sec.
07:38:18 Script: Append GenQ . GenQuotes SymbolCount/RecCount: 0/0. Duration: 1 sec.
*** Error. Please specify parameter value in psConfig.txt file
Import-CSV : Could not find file 'C:\PortfolioSlicer\PSData\TransactionsInExcel.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\GetExcelCostBasis.ps1:13 char:6
+ $f = Import-CSV -Path $transFile -Delimiter `t | Sort Account,Symbol, ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

You cannot call a method on a null-valued expression.
At C:\PortfolioSlicer\Scripts\Scripts\GetExcelCostBasis.ps1:69 char:1
+ $fTxt = $fTxt.Substring(0, $fTxt.Length-$eol.Length); # Removing last ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

07:38:21 Script: CalcCostBasis . Duration: 0 sec.
import-csv : Could not find file 'C:\PortfolioSlicer\PSData\Symbol.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\psCheckFiles.ps1:211 char:15
+ ... ymbolList = import-csv ($psDataFolder + "\Symbol.csv") -Delimiter $co ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

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


import-csv : Could not find file 'C:\PortfolioSlicer\PSData\CompareTo.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\psCheckFiles.ps1:228 char:7
+ $sl = import-csv ($psDataFolder + "\CompareTo.csv") -Delimiter $colSe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

Symbol '* Cash' in CompareTo.csv but not in Symbol.csv
import-csv : Could not find file 'C:\PortfolioSlicer\PSData\SymbolAllocation.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\psCheckFiles.ps1:234 char:7
+ $sl = import-csv ($psDataFolder + "\SymbolAllocation.csv") -Delimiter ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

Symbol '* Cash' in SymbolAllocation.csv but not in Symbol.csv
import-csv : Could not find file 'C:\PortfolioSlicer\PSData\SymbolSector.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\psCheckFiles.ps1:240 char:7
+ $sl = import-csv ($psDataFolder + "\SymbolSector.csv") -Delimiter $co ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

Symbol '* Cash' in SymbolSector.csv but not in Symbol.csv
import-csv : Could not find file 'C:\PortfolioSlicer\PSData\TransType.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\psCheckFiles.ps1:256 char:18
+ ... sTypeList = import-csv ($psDataFolder + "\TransType.csv") -Delimiter ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

import-csv : Could not find file 'C:\PortfolioSlicer\PSData\Allocation.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\psCheckFiles.ps1:266 char:19
+ ... ationList = import-csv ($psDataFolder + "\Allocation.csv") -Delimiter ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

import-csv : Could not find file 'C:\PortfolioSlicer\PSData\SymbolAllocation.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\psCheckFiles.ps1:267 char:7
+ $al = import-csv ($psDataFolder + "\SymbolAllocation.csv") -Delimiter ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

import-csv : Could not find file 'C:\PortfolioSlicer\PSData\ReportCurrency.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\psCheckFiles.ps1:276 char:17
+ ... rencyList = import-csv ($psDataFolder + "\ReportCurrency.csv") -Delim ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

import-csv : Could not find file 'C:\PortfolioSlicer\PSData\Account.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\psCheckFiles.ps1:277 char:7
+ $cl = import-csv ($psDataFolder + "\Account.csv") -Delimiter $colSep ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

import-csv : Could not find file 'C:\PortfolioSlicer\PSData\Symbol.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\psCheckFiles.ps1:283 char:7
+ $cl = import-csv ($psDataFolder + "\Symbol.csv") -Delimiter $colSep | ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

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
import-csv : Could not find file 'C:\PortfolioSlicer\PSData\Account.csv'.
At C:\PortfolioSlicer\Scripts\Scripts\psCheckFiles.ps1:306 char:16
+ ... countList = import-csv ($psDataFolder + "\Account.csv") -Delimiter $c ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

07:38:23 Script: CheckFiles . Duration: 4 sec.
***** Generated PS files were checked - errors were found, please review *****

Comments

  • @Mat
    Your quotes are downloading, but it appears that the scripts are not executed in an order as expected. I do not see in your list execution of the script GetExcelSrdData.
    I am assuming you have latest scripts.
    I am assuming you are running UpdatePSData.bat file and you are getting these errors.
    Can you open with notepad UpdatePSData.bat file and post the screenshot of that file. I am expecting something like this:



  • I tried to paste the UpdatePSData file but the website blocked me. I send you a message
  • I am using PortfolioSlicer2.3. The latest script was downloaded. I see on the last sentence of the UpdatePSData file it refers to PortfolioSlicer3.1-Report.xlsx. Is the file path correct?
  • Good that you let me know that you are using PS 2.3. I was checking v3 code.
    So your UpdatePSData.bat is from v3.1
    Your UpdaePSData.bat should be:


    echo off
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotes-Yahoo.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotes-YahooIntraday.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotes-Google.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotes-GoogleWeb.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotes-AlphaVantage.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotes-Stooq.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotes-GoogleIntraday.ps1
    REM powershell -ExecutionPolicy Bypass .\Scripts\GetExchRates-BoC.ps1
    REM powershell -ExecutionPolicy Bypass .\Scripts\GetExchRates-ECB.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetExchRates-Stooq.ps1
    REM powershell -ExecutionPolicy Bypass .\Scripts\GetExchRates-YahooIntraday.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetExchRates-XEIntraday.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\GetDividends-Yahoo.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\psArchiveOldQuotes.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\psMakeAllDataFiles.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\psCreateDatesFile.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\psAppendGeneratedQuotes.ps1
    powershell -ExecutionPolicy Bypass .\Scripts\psCheckFiles.ps1
    choice /C Y /T 10 /D Y /M "Waiting 10sec before closing"


    But it apprears that you updaed psCheckFiles.ps1 file with the script from v3. That is why you are getting these error messages.
    I attached 2.3 version of PsCheckFiles.ps1 file - can you copy it into your scripts location) save current version to another folder and try to run again.

  • I have updated the UpdatePSData file using your script above and also use the psCheckFiles from your message. However, it still does not work. See the attached error log
  • Hi @Mat

    I can see 2 script errors:
    GetExchRates-Stooq.ps1
    GetExchRates-XEIntraday.ps1

    Can you please edit .bat file and comment out these 2 scripts.
    That is in .bat file you change line:

    powershell -ExecutionPolicy Bypass .\Scripts\GetQuotes-Stooq.ps1

    to
    REM powershell -ExecutionPolicy Bypass .\Scripts\GetQuotes-Stooq.ps1


    Same for the XEIntraday.ps1 script.

  • I replaced the script based on your instructions. The quote still does not download and Attached is the log:
  • Hi @Mat

    In the future - please paste your error message into .txt file, not a .docx file - that is much more secure for me to read.

    In your attached error log I can still see the error message that references script:
    GetExchRates-Stooq
    So that script is still executing and should be disabled (commented out).

    Please make sure that you have REM then space then powershel.... before that script, like this:

    REM powershell -ExecutionPolicy Bypass .\Scripts\GetExchRates-Stooq.ps1



    Likely you already disabled script GetQuotes-Stooq, but this is another script for exchange rates.
  • No more error message, which is good.
    However, the quote is not downloaded. When I open Portfolio Slicers, the stock values of the portfolio go to zero. Attached are the quote file and the UpdatePSData. Please help!!
  • In Scripts\psConfig.txt do you have XBAL.TO listed in Yahoo section? Can you do a screenshot of Yahoo section and post it here - I want to make sure that this simbol dates not have MaxDate specified.
  • Below is the Yahoo section:

    # Yahoo: list of symbols from Yahoo Finance website (link to download csv file available). Format: Symbol,MinDate,MaxDate,IntraDayFlag[Y|N],[DividendFlag[Y|N],FactorHistory,FactorIntraDay,FactorDividend


    ^GSPTSE
    ^GSPC
    XEI.TO
    VAB.TO
    ZDI.TO
    RIT.TO
    XSH.TO
    VEE.TO
    VXC.TO
    ZMI.TO
    XAW.TO
    VCE.TO
    HXT.TO
    VSC.TO
    VBU.TO
    ZMU.TO
    ENB.TO
    IPL.TO
    TRP.TO
    ENF.TO
    TF.TO
    FC.TO
    MKP.TO
    BIP-UN.TO
    BPY-UN.TO
    BEP-UN.TO
    BEI-UN.TO
    CAR-UN.TO
    CUF-UN.TO
    HR-UN.TO
    REI-UN.TO
    NVU-UN.TO
    HOT-UN.TO
    ZRE.TO
    BNS.TO
    TD.TO
    RY.TO
    XHY.TO
    ZHY.TO
    T.TO
    BCE.TO
    ZCS.TO
    PPL.TO
    ZDV.TO
    STB.TO
    FTS.TO
    CBO.TO
    RUF-un.V
    XSB.TO
    VOO
    ITOT
    HDV
    USRT
    ACWV
    IGF
    IXUS
    IXP
    JXI
    DGRO
    AGG
    BND
    VCIT
    VCSH
    VOX
    VPU
    VXUS
    VIG
    VNQ
    EFAV
    VTR
    HCN
    MMP
    T
    SEP
    ENB
    EFAV
    RY
    GSBD
    VFH
    XLF
    REM
    HSBC
    XRE.TO
    VUN.TO
    XIC.TO
    ZUT.TO
    VFV.TO
    VSP.TO
    VCN.TO
    VRE.TO
    ZGI.TO
    SHYG
    VSB.TO
    AQN.TO
    ZUB.TO
    XIN.TO
    VGH.TO
    ZQQ.TO
    XLK
    ZDM.TO
    BXMT
    MSFT
    XLI
    VYM
    XFH.TO
    ZDM.TO
    VIG
    KRE
    OKE
    XSP.TO
    VDY.TO
    WM
    XLE
    BRK-B
    XUU.TO
    ALA.TO
    V
    TRP
    RY
    TOG.TO
    BCE
    FN.TO
    VBAL.TO
    XBAL.TO
    VGRO.TO
    XGRO.TO
    AI.TO
    XRE.TO
    ZDV.TO
    ZLB.TO
    ZLI.TO
    AOR
    AOM
    WCP.TO
    VTI
    MKP.TO
    WCP.TO
    PSA.TO
    GLD
    IAU
    XUS.TO
    KILO.TO
    HBAL.TO
    HXS.TO
    HSAV.TO
    VCNS.TO
    VRIF.TO
    AOA
    PSU-U.TO
    XHB
    VHT
    XHC.TO
    HXE.TO
    XQQ.TO
    IBIT
  • Hi @Mat

    Something does not add up. Latest execution log you posted had lines:
    C:\PortfolioSlicer\Scripts>echo off
    20:53:53 Script: Yahoo Historical . Quotes Requested/Succeed/Failed/Rows: 2/0/0/0. Duration: 0 sec.
    20:53:53 Script: Yahoo Intraday . Quotes Requested/Succeed/Failed/Rows: 2/2/0/2. Duration: 0 sec.

    That means you are requesting just 2 symbols from Yahoo section.
    So you need very carefully confirm all paths.

    It appears from your logs that you execution .bat file in C:\PortfolioSlicer\Scripts folder
    So please check C:\PortfolioSlicer\Scripts\psConfig.txt file - that is your config file.
    Did you check that file and posted here list of symbols from Yahoo section?


Sign In or Register to comment.