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

Filepath length and registry settings #1

Open
rkaufman058 opened this issue Jul 15, 2024 · 0 comments
Open

Filepath length and registry settings #1

rkaufman058 opened this issue Jul 15, 2024 · 0 comments

Comments

@rkaufman058
Copy link
Member

rkaufman058 commented Jul 15, 2024

This version of plottr will tend to make VERY long filepaths. It turns out that Windows will only allow 260 character filenames, and so the user will run into the issue of very long filepaths not being readable from their python scripts. This will show as a raised ValueError exception - "ValueError: Specified file does not exist."

Now most of the time, this is because of a typo in your filename, forgotten backslash, etc. However if the filename is very long and you have triple-checked it, this might be the issue.

The long-term fix would be to avoid using longer filenames, and develop a mechanism for saving metadata in the plottr file itself rather than using the filename.

The short-term bandaid solution is to change a windows registry setting that allows the use of longer filenames. That is documented here.

The short version, in case that page goes down, is to edit the following key:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled

to have the value 1.

@rkaufman058 rkaufman058 changed the title Filename length and registry settings Filepath length and registry settings Jul 15, 2024
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

1 participant