How to resolve Statistica data function fails in Spotfire with error "Could not find a part of the path '... .sbdf'"

How to resolve Statistica data function fails in Spotfire with error "Could not find a part of the path '... .sbdf'"

book

Article ID: KB0070750

calendar_today

Updated On:

Products Versions
Spotfire Statistica 14.0.0

Description

Statistica data function fails with the following errors:

Could not execute function call 'Multivariate Analysis - Time Series_Champion_1'

Could not find a part of the path 'C:\tibco\tsnm\12.5.0\nm\services\WebWorker-61.0.18519.3596-0829b9f8-6785-4a9c-ad5a-ef1ecc7fa831\Temp\6srEu1n-bku4JNkap6Frww\1a4zdv13.xkl\Outputs\SANN Time series (regression), Automatic network search (ANS)\Predictions spreadsheet for Group Mass C (Subset).sbdf'.


Root cause:
In Windows, the maximum length for a path is MAX_PATH, which is defined as 260 characters.  Once our file names exceed this limit, it throws an error and does not get saved in the system.  Thus this is mainly due to the name of the generated file being very long and exceeding the Maximum Path Length Limitation of Windows System.

Environment

Windows 10 and Later.

Resolution

We can enable the long-path behavior in Windows by following these steps:
 

RESOLUTION 1 : Make these changes to a Windows registry (two parts a. and b.)

a.  Set LongPathEnabled to a value of 1 in Registry


1. Make sure you are an admin user on your system.
2. Edit the Registry Changes by running Regedit (Press Win + R keys on your keyboard)
3. The key to change is located at:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled
4. Set the key’s DWORD value to “1”
5.  Click the OK  button

Enable LongPathsEnabled in Registry

b.  Add a new Group Policy entry in the Registry

1. Press Win + R keys on your keyboard and type regedit then press Enter. Registry Editor will be opened.
2. Go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Policies.
3. Create a new 32-bit DWORD value named LongPathsEnabled and set the value to 1.
4. Click the OK button
4. Reboot to activate the changes.

RESOLUTION 2:

Rename any nodes that contribute to the path name being very long. For example, changing the workspace name length, or creating a new workspace, as well as renaming the node names in it, results in reduced name length and hence able to save such files without throwing an exception in Statistica Engine deployed on Spotfire.

To Customize Output functionality of the executed nodes in Statistica please check: https://support.tibco.com/s/article/How-to-customize-and-preserve-the-output-table-names-in-Statistica-Reporting-document-node
 

Issue/Introduction

This article will show changes to be made in Windows Registry to allow operating system to save long file names.

Additional Information

https://support.tibco.com/s/article/How-to-customize-and-preserve-the-output-table-names-in-Statistica-Reporting-document-node

https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry