Howdy, Stranger!

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

script issue

Vidas,
Any idea as to the issue here? Nothing has changed except I did not use PS for about two weeks, came back and now I have this error.


Comments

  • I have exactly the same issue. It stopped working out of the blue and I have changed nothing in my files.
  • I just run scripts on my computer and it worked without any problems.
    You screenshot shows error in the script GetQuotes-Yahoo.ps1, line 20. And it shows code that created this error, but that code was replaced with new code on 2024-Oct-03.
    Based on the screenshot above, you need to download latest data management scripts from download page and try running it.
  • edited July 28
    Hi Vidas!

    I have been using the latest scripts since they were released. And these errors started happening to me a few weeks ago out of the blue, I did not change anything. I executed the script one day, as usual, and it just happened. The errors in my case show different lines than the OP's.


  • @Nomperor - at the start of GetQuotes-Yahoo.ps1 script (and most of other scripts) first few lines are:
    $scriptPath = Split-Path -parent $MyInvocation.MyCommand.Definition;
    . ($scriptPath + "\psFunctions.ps1"); # Adding script with reusable functions
    . ($scriptPath + "\psSetVariables.ps1"); # Adding script to assign values to common variables


    First line sets @scriptPath location - folder were you current .ps1 script is located.
    Second line tries to add script psFunctions.ps1 from the same location as GetQuotes-Yahoo.ps1.
    So can you please review your folder:
    c:\Users\javie\OnDrive\PortfolioSlicer\PSDataExtracts\Scripts
    Do you have scripts psSetVariables.ps1 and psFunctions.ps1 in that folder?
Sign In or Register to comment.