-
Notifications
You must be signed in to change notification settings - Fork 11
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
OSError: [Errno 22] Invalid argument
when loading an SLP file
#106
Comments
Here are the relevant offending lines: Lines 57 to 80 in 5b79a22
From the original issue, the path stored in the SLP file is:
There's clearly both forward slashes and (escaped) backslashes, but pathlib should handle it. Follow up investigation: cannot reproduce on Colab. Not only does the SLP file load, but I can't even get the same error when running the actual erroring line: import os
os.stat("train/top\\top-10072022134804-0000_h265_CRF12_denoised.mp4") Output:
Note that it's This tells me that it's maybe a file system issue? Either way, keeping this open as a reminder that we should probably expose the logic in |
Relevant pathlib sections:
But it does seem like Maybe on some platforms we need to sanitize the filename manually? |
OSError: [Errno 22] Invalid argument
when loading an SLP file
Fixed in sleap-io v0.1.7. |
Currently when I try to load a .slp file with a bad video file name eg:
I get the following error:
I know theres a
Labels.replace_filename
but you need to be able to load the file first. Therefore, it would be nice if either A. you can pass in avideos
argument to override the current video OR if it can't open it just ignore and warn the user so you can at least access the actual labelsPS:
sleap.load_file(slp_file)
works fine so I'm not sure whats different at an implementation level
The text was updated successfully, but these errors were encountered: