Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
seerapubhavyareddy opened this issue Jun 25, 2024 · 1 comment

Comments

@seerapubhavyareddy
Copy link

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

  • OS: Windows 10/11
  • Python version: 3.12

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants