04-30-2023, 07:27 AM
Leonide
After some more experimenting, it looks like I've found a solution. It may not be the best solution, and feel free to tell me if it isn't, but it is at least *a* solution. I went into the "Properties" tab for the folder where the image was supposed to be saved and added write permissions for the "Guests" object. I guess either Gimp or Python was running as a guest.
Weird. Next time you run your script, once its dialog is up, open the process/performance monitor (right-click the clock in the system tray) and check the id running the Python process. It should be your ID... (same as the Gimp process).
(04-29-2023, 10:04 PM)Ofnuts Wrote: Nothing obvious, so:
Also:
- Check the system security log, perhaps the python interpreter is blacklisted and it (or its children) are not allowed to write to disk.
- If you catch the exception and print the exception message, you could have more info (see here for some hints)
- The OneDrive directory could have a special status, and this isn't difficult to check by writing elsewhere.
- I assume that MyId is replaced by the adequate username
- Your first name parameter has no extension, so I wonder what the real name is and what it does
- You can avoid the double \\ by using r-strings: r"C:\Users\MyID\OneDrive\Pictures\ScriptTest\", but forward slashes also work on Windows: "C:/Users/MyID/OneDrive/Pictures/ScriptTest/"
- The os.path module has a join method to create correct paths from directories and file names.
After some more experimenting, it looks like I've found a solution. It may not be the best solution, and feel free to tell me if it isn't, but it is at least *a* solution. I went into the "Properties" tab for the folder where the image was supposed to be saved and added write permissions for the "Guests" object. I guess either Gimp or Python was running as a guest.
Weird. Next time you run your script, once its dialog is up, open the process/performance monitor (right-click the clock in the system tray) and check the id running the Python process. It should be your ID... (same as the Gimp process).