"Original Path Stream Error" In Output Window

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
cam_ratliff
Posts: 3
Last visit: Tue Aug 18, 2020 11:36 am

"Original Path Stream Error" In Output Window

Post by cam_ratliff »

Product: PowerShell Studio 2018 (64 Bit)
Build: v5.5.155
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.17134.0

Hello,

Whenever I'm running Powershell Studio, I get an error in my Output window that says
Original Path Stream Error: Object must be a root directory ("C:\") or a drive letter ("C").
This error appears regardless of what file I have opened in the editor. It can be a brand new file that is completely blank and the error will still appear. It continually pops up, too, which prevents me from closing out the window. I checked my Directories section in my settings and here is what I've got:

Default Files Directory:
U:\My Documents\SAPIEN\PowerShell Studio\Files
Default Project Directory:
U:\My Documents\SAPIEN\PowerShell Studio\Projects
Template Directory:
U:\AppData\Roaming\SAPIEN\PowerShell Studio 2018\Templates
I'm running out of ideas as to what could be causing this, so, any advice would be appreciated.

Thank you!
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: "Original Path Stream Error" In Output Window

Post by davidc »

So I can assist you further, please answer the following questions:

1. Are you able to see the preset template files?
2. Can you run the following script and see what output you get?

Code: Select all

$path = [System.Environment]::GetFolderPath('ApplicationData')
$path
$root = [System.IO.Path]::GetPathRoot($path)
$root
$driveInfo = [System.IO.DriveInfo]::new($root)
$driveInfo.DriveFormat
David
SAPIEN Technologies, Inc.
cam_ratliff
Posts: 3
Last visit: Tue Aug 18, 2020 11:36 am

Re: "Original Path Stream Error" In Output Window

Post by cam_ratliff »

1. Where would I find the preset templates? Haven't done anything with that.

2. Here is the output of the script you had me run:
>> Running (sapien support script.ps1) Script...
>> Platform: V5 64Bit (STA)
\\company-fs\users$\cratliff\AppData\Roaming
\\company-fs\users$
ERROR: Exception calling ".ctor" with "1" argument(s): "Object must be a root directory ("C:\") or a drive letter ("C")."
sapien support script.ps1 (19, 1): ERROR: At Line: 19 char: 1
ERROR: + $driveInfo = [System.IO.DriveInfo]::new($root)
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
ERROR: + FullyQualifiedErrorId : ArgumentException
ERROR:

*** PowerShell Script finished. ***
>> Execution time: 00:00:01
>> Script Ended
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: "Original Path Stream Error" In Output Window

Post by davidc »

Looks like the UNC path is causing the issue. This issue will be resolved in the service build after the upcoming release. In the meantime, you can get around this issue by disabling the File Recovery feature in Options->Backup->File Recovery:
Option - Enable File Recovery.png
Option - Enable File Recovery.png (21.26 KiB) Viewed 2301 times
David
SAPIEN Technologies, Inc.
cam_ratliff
Posts: 3
Last visit: Tue Aug 18, 2020 11:36 am

Re: "Original Path Stream Error" In Output Window

Post by cam_ratliff »

Thanks for the help, that fixed it.

Any idea what causes it? My co-worker has similar settings and he wasn't getting the error.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: "Original Path Stream Error" In Output Window

Post by davidc »

If your co-working is using a mapped drive path, it should be fine.
PowerShell Studio was checking the drive before writing the recovery information, but the .NET object requires a letter drive. We changed the behavior so it no longer needs to check the drive.
David
SAPIEN Technologies, Inc.
This topic is 5 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.