Bug 475543

Summary: Script shortcuts no longer work: "[Errno 1] Operation not permitted"
Product: [Applications] krita Reporter: cruiselinermod
Component: ScriptingAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.1.5   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description cruiselinermod 2023-10-13 00:47:43 UTC
SUMMARY

All of the scripts I've assigned to shortcuts through the 'Ten scripts' interface have abruptly stopped working. Trying to use any of them results in the same error tooltip: "[Errno 1] Operation not permitted:", followed by the path to the script file.

The file paths are correct; restarting Krita or rebooting the computer do nothing to solve the issue. I also tried reinstalling both Krita and Python through Pamac.

Having tried AppImages of version 5.2 and the latest nightly, the error persists across all versions.

Note: I also noticed that trying to load a Python script file from the scripter gets me an "Invalid File -- Krita" error dialog, with the message: "Open files with .py extension". All my script files have a .py extension.


STEPS TO REPRODUCE
1. Tools  >  Scripts  >  Ten Scripts
2. Set a script file (even an empty one) to one of the shortcuts.
3. Confirm to close the dialog and try using the assigned shortcut.


OBSERVED RESULT

An error tooltip is displayed: "[Errno 1] Operation not permitted:", followed by the path to the script file.


EXPECTED RESULT

The script is usually executed without any problems.


SOFTWARE/OS VERSIONS

Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.1.55-1-MANJARO (64-bit)


ADDITIONAL INFORMATION

Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-8700K CPU @ 3.70GHz
Memory: 31.3 Gio of RAM
Graphics Processor: AMD Radeon RX 590 Series


Thank you.
Comment 1 cruiselinermod 2023-10-13 18:16:16 UTC
It seems the problem came from a diacritic in the file path. I removed an accented character from one folder name, and updated the path in Krita, and the script shortcuts are now functional again.

There was no issue until a short time ago, so I imagine the problem was introduced by a recent update to either the OS, Python or Krita.

Krita does say when a script file can't be found. If it considers a file path to be invalid, I'd strongly recommend specifying this in similar fashion; "Operation not permitted" is a very vague and misleading error message, suggesting that file permissions or interfering software may be at fault.

Thank you.