Easy-GPU-PV icon indicating copy to clipboard operation
Easy-GPU-PV copied to clipboard

Error Updating Drivers with Update Script - "You cannot call a method on a null-valued expression"

Open pulseOXE opened this issue 3 years ago • 3 comments

I've been using this for a bit now, and just updated my hosts NVidia driver, and tried running Update-VMGpuPartitionDriver.ps1 with the correct flags for my VMName, and I'm getting an error.

Here is what I am running: C:\Users\xxxxx\Downloads\Easy-GPU-PV-main\Update-VMGpuPartitionDriver.ps1 -VMName GamingVM - GPUName AUTO

Here is the output: Mounting Drive... Copying GPU Files - this could take a while... INFO : Finding and copying driver files for - to VM. This could take a while... You cannot call a method on a null-valued expression. At C:\Users\xxxxx\Downloads\Easy-GPU-PV-main\Add-VMGpuPartitionAdapterFiles.psm1:33 char:17

  • ... $ServiceDriverDir = $servicepath.split('')[0..5] -join(' ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression. At C:\Users\xxxxx\Downloads\Easy-GPU-PV-main\Add-VMGpuPartitionAdapterFiles.psm1:34 char:64

  • ... iveletter" + "" + $($servicepath.split('')[1..5] -join(''))).Repla ...

  •                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

    Any ideas on what is going on here?

pulseOXE avatar Jan 20 '22 15:01 pulseOXE

Same issue here, it prevented me from login in using Parsec. I also couldn't create a new machine since I get the same error.

remy33 avatar Apr 28 '22 17:04 remy33

OK, After some debugging, I found out that I have a typo while writing the GPU name. As well as the original question has a space:

I've been using this for a bit now, and just updated my hosts NVidia driver, and tried running Update-VMGpuPartitionDriver.ps1 with the correct flags for my VMName, and I'm getting an error.

Here is what I am running: C:\Users\xxxxx\Downloads\Easy-GPU-PV-main\Update-VMGpuPartitionDriver.ps1 -VMName GamingVM - GPUName AUTO

The default behavior should be to exit if there are missing parameter or set it to AUTO as default but not ignore it.

remy33 avatar Apr 28 '22 17:04 remy33