Bug 446085

Summary: Error after double clicking on .py file when is_executable is checked
Product: [Applications] dolphin Reporter: Artur Rudenko <catcool419>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kfm-devel, p.r.worrall
Priority: NOR    
Version First Reported In: 21.08.3   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Error window
Python test file

Description Artur Rudenko 2021-11-25 18:53:11 UTC
Created attachment 143941 [details]
Error window

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Create .py file
2. Set it as executable
3.  Try to open it by double clicking

OBSERVED RESULT
Unknown error code 100
execvp: Not a directory

EXPECTED RESULT
Executing (?) python file

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Manjaro KDE 
(available in About System)
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15-2

ADDITIONAL INFORMATION
Comment 1 Paul Worrall 2021-11-26 14:01:31 UTC
Created attachment 143967 [details]
Python test file

I followed your steps, creating the attached .py (a simple "Hello World" using PyQt5), but couldn't reproduce the error message, could you repeat the test with the attached file?
Comment 2 Artur Rudenko 2021-11-26 15:14:35 UTC
(In reply to Paul Worrall from comment #1)
> Created attachment 143967 [details]
> Python test file
> 
> I followed your steps, creating the attached .py (a simple "Hello World"
> using PyQt5), but couldn't reproduce the error message, could you repeat the
> test with the attached file?

Ah, missing shebang is the problem. Without "#!/usr/bin/env python3", looks like it is trying to run it as bash file, even if the file has .py extension