Open luni-moon opened 9 months ago
It tried ( fp = builtins.open(filename, "w+b") ) to access the file 'session_4c76892e\curframe_87945d84.jpeg' but couldn't.
I'm just gonna have gpt type this: Directory Permissions: The directory where the script is trying to save the image file doesn't have write permissions for the user under which the Python script is running. This is common in environments with restricted user permissions or when directories are created by other users or systems.
File is Open: If the file or the directory it resides in is open in another program (for example, an image viewer or an editor locked the directory), the OS might prevent writing to it.
Path Does Not Exist: The directory session_4c76892e might not exist or might not be accessible due to permission issues or path errors.
Running as a Non-Administrator: If you're on Windows, running your script without administrator privileges might restrict access to certain paths.
How to Fix:
Check Directory Permissions: Ensure that the directory session_4c76892e exists and your user account has write permissions to it. You can check and modify permissions via the file properties dialog in Windows or using chmod on Unix-like systems.
Close Other Programs: Make sure no other programs are using the file or directory you're trying to write to.
Ensure Directory Exists: Before saving the file, ensure the directory exists. You can use Python's os or pathlib modules to check and create directories:
python
import os
dir_name = "session_4c76892e"
if not os.path.exists(dir_name):
os.makedirs(dir_name)
Run as Administrator: Try running your script as an administrator to rule out permission issues.
Use Absolute Paths: Sometimes, using relative paths can lead to issues depending on where the script is executed from. Try specifying an absolute path to see if it resolves the issue.
File Path in open: The error is happening because you're trying to open a file in binary write mode ("w+b"), but the path points to an image file. Ensure you're using the correct path and that the path string is properly formatted.
If these steps don't solve the issue, you might want to double-check the path you're trying to write to and ensure there are no typos or incorrect path separators (\ for Windows, / for Unix-like systems).
If you need further help, feel free to ask in the discord help channel! 😊 https://discord.com/invite/rCVvDykK
It tried ( fp = builtins.open(filename, "w+b") ) to access the file
'session_4c76892e\curframe_87945d84.jpeg'
but couldn't.
I'm just gonna have gpt type this:
Directory Permissions: The directory where the script is trying to save the image file doesn't have write permissions for the user under which the Python script is running. This is common in environments with restricted user permissions or when directories are created by other users or systems. File is Open: If the file or the directory it resides in is open in another program (for example, an image viewer or an editor locked the directory), the OS might prevent writing to it. Path Does Not Exist: The directory session_4c76892e might not exist or might not be accessible due to permission issues or path errors. Running as a Non-Administrator: If you're on Windows, running your script without administrator privileges might restrict access to certain paths.
How to Fix:
Check Directory Permissions: Ensure that the directory session_4c76892e exists and your user account has write permissions to it. You can check and modify permissions via the file properties dialog in Windows or using chmod on Unix-like systems. Close Other Programs: Make sure no other programs are using the file or directory you're trying to write to. Ensure Directory Exists: Before saving the file, ensure the directory exists. You can use Python's os or pathlib modules to check and create directories: python import os dir_name = "session_4c76892e" if not os.path.exists(dir_name): os.makedirs(dir_name) Run as Administrator: Try running your script as an administrator to rule out permission issues. Use Absolute Paths: Sometimes, using relative paths can lead to issues depending on where the script is executed from. Try specifying an absolute path to see if it resolves the issue. File Path in open: The error is happening because you're trying to open a file in binary write mode ("w+b"), but the path points to an image file. Ensure you're using the correct path and that the path string is properly formatted.
If these steps don't solve the issue, you might want to double-check the path you're trying to write to and ensure there are no typos or incorrect path separators (\ for Windows, / for Unix-like systems).
If you need further help, feel free to ask in the discord help channel! 😊 https://discord.com/invite/rCVvDykK
This doesn't make sense as it ran for 5-10m prior, without fail, writing images and such, so I don't know. I didn't have any other programme that could interfere open, and the programme created the path, so it should definitely work. I'll join the discord when I get up. The only thing I can think of is it being on a non-C:\ drive.
Hey! I have seen this before on windows. One potential cause is that if you have the image folder open in file explorer, the windows thumbnail generating process can lock the file for a short amount of time and sometimes cause that error. a few possible solutions- a. make sure that folder isn’t open while the training is running, b. wrap the file write in the env with a try/except to ignore the error, c. comment out / disable the screenshot file writing. hope that helps!
Error Logs
Does this happen because the training hit hard-coded constraints that ends the run? The command I used is
python run_baseline_parallel_fast.py
in the\baselines
directory. This has happened twice consecutively, and I've only tried this twice.My PC Specs: