sensein / b2aiprep

Apache License 2.0
5 stars 6 forks source link

Windows 'file not found' error due to long file paths when using b2aiprep dashboard #66

Open seerapubhavyareddy opened 1 month ago

seerapubhavyareddy commented 1 month ago

Description When using the b2aiprep dashboard on Windows, users may encounter "file not found" errors. This is likely due to Windows' default limitation on file path length.

Steps to Reproduce

  1. Install b2aiprep on a Windows system
  2. Some pages on the dashboard cannot load and run because of the file not found issue. Even though the file still exits in the location. PS: Adding an image for reference for the issue.. on the dashboard image

Expected Behavior

The dashboard should be able to load and run all the pages and process files regardless of path length.

Actual Behavior

Files with long paths are not found or accessed, causing errors in the dashboard functionality.

Possible Solution

Enable long path support in Windows. This can be done through:

  1. Group Policy Editor (for Pro/Enterprise editions)
  2. Registry Edit (for all editions, including Home)

Detailed steps for Registry Edit methods (On windows home): _1. Open the Registry Editor:

Press Win + R to open the Run dialog Type "regedit" and press Enter If prompted by User Account Control, click "Yes"

  1. In the Registry Editor, navigate to this key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem You can do this by expanding each folder in the left pane, or by copying and pasting the above path into the address bar at the top of the Registry Editor window.
  2. In the right pane, look for a value named "LongPathsEnabled"

If it exists, double-click it If it doesn't exist, right-click in the right pane, select New > DWORD (32-bit) Value, and name it "LongPathsEnabled"

  1. Set the value:

Double-click "LongPathsEnabled" In the "Value data" field, enter "1" Click "OK"

  1. Close the Registry Editor
  2. Restart your computer for the changes to take effect_

Environment

Additional Context

This issue is specific to Windows due to its default limitations on file path length. Linux and macOS users are unlikely to encounter this problem.

alistairewj commented 1 month ago

Great alternative solution. We will look to shorten the subject and session identifiers from UUIDs to prevent this in the future.