Bug 449357

Summary: i get an error 100 when i try to open .py files from dolphin
Product: [Applications] dolphin Reporter: omishere21
Component: panels: foldersAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: major CC: kfm-devel, nicolas.fella
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: error 100 when i try to open .py files from dolphin
attachment-25653-0.html
attachment-31031-0.html
attachment-5586-0.html
attachment-10075-0.html
attachment-10448-0.html

Description omishere21 2022-01-30 09:35:28 UTC
Created attachment 146068 [details]
error 100 when i try to open .py files from dolphin

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. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Nicolas Fella 2022-01-30 12:54:02 UTC
What's the output of running "xdg-mime query default text/x-python"
Comment 2 omishere21 2022-01-31 16:23:53 UTC
Created attachment 146099 [details]
attachment-25653-0.html

on executing the above command the output i got is: org.kde.kate.desktop

On Sun, Jan 30, 2022 at 6:24 PM Nicolas Fella <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=449357
>
> Nicolas Fella <nicolas.fella@gmx.de> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |nicolas.fella@gmx.de
>
> --- Comment #1 from Nicolas Fella <nicolas.fella@gmx.de> ---
> What's the output of running "xdg-mime query default text/x-python"
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 Nicolas Fella 2022-01-31 16:37:23 UTC
Does running "kstart5 --application org.kde.kate" work?
Comment 4 omishere21 2022-01-31 16:56:20 UTC
Created attachment 146101 [details]
attachment-31031-0.html

Yes, it works. but the real problem still persists. The file manager i.e
dolphin, throws an error 100 when i try to open a .py file. Whereas when I
open a (.c) file or even a (.ipynb) file for that matter, it opens in kate.
It's only happening with .py file.


On Mon, Jan 31, 2022 at 10:07 PM Nicolas Fella <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=449357
>
> --- Comment #3 from Nicolas Fella <nicolas.fella@gmx.de> ---
> Does running "kstart5 --application org.kde.kate" work?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 5 Nicolas Fella 2022-01-31 17:18:03 UTC
What does "kmimetypefinder5 /path/to/file.py" show?
Comment 6 omishere21 2022-01-31 17:35:17 UTC
Created attachment 146102 [details]
attachment-5586-0.html

it shows "text/x-python"


On Mon, Jan 31, 2022 at 10:48 PM Nicolas Fella <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=449357
>
> --- Comment #5 from Nicolas Fella <nicolas.fella@gmx.de> ---
> What does "kmimetypefinder5 /path/to/file.py" show?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 7 Nicolas Fella 2022-01-31 17:40:47 UTC
I think I know what's going on. It looks like Dolphin is trying to execute the python script instead of opening it in Kate, and it probably fails to execute because there's no shebang (e.g. #!/usr/bin/env python3) in the top of the file
Comment 8 omishere21 2022-01-31 17:59:17 UTC
Created attachment 146104 [details]
attachment-10075-0.html

yes i got a similar solution on stackoverflow. now it does not show error
100, but it doesn't open either. earlier it used to open .py files in kate
without any problem. This problem started 3 days ago.

On Mon, Jan 31, 2022 at 11:10 PM Nicolas Fella <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=449357
>
> --- Comment #7 from Nicolas Fella <nicolas.fella@gmx.de> ---
> I think I know what's going on. It looks like Dolphin is trying to execute
> the
> python script instead of opening it in Kate, and it probably fails to
> execute
> because there's no shebang (e.g. #!/usr/bin/env python3) in the top of the
> file
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 9 omishere21 2022-01-31 18:01:16 UTC
Created attachment 146105 [details]
attachment-10448-0.html

Also, I wanted to know how dolphin started to execute python scripts all of
a sudden.

On Mon, Jan 31, 2022 at 11:28 PM Hades21 <omishere21@gmail.com> wrote:

> yes i got a similar solution on stackoverflow. now it does not show error
> 100, but it doesn't open either. earlier it used to open .py files in kate
> without any problem. This problem started 3 days ago.
>
> On Mon, Jan 31, 2022 at 11:10 PM Nicolas Fella <bugzilla_noreply@kde.org>
> wrote:
>
>> https://bugs.kde.org/show_bug.cgi?id=449357
>>
>> --- Comment #7 from Nicolas Fella <nicolas.fella@gmx.de> ---
>> I think I know what's going on. It looks like Dolphin is trying to
>> execute the
>> python script instead of opening it in Kate, and it probably fails to
>> execute
>> because there's no shebang (e.g. #!/usr/bin/env python3) in the top of
>> the file
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>
>