ozmartian / vidcutter

A modern yet simple multi-platform video cutter and joiner.
GNU General Public License v3.0
1.78k stars 134 forks source link

GLib-GIO-ERROR on FileChooser #319

Closed ProfDavidMora closed 2 years ago

ProfDavidMora commented 3 years ago

Hi, thanks for your software. I have encountered a problem when opening files on 6.0.5.1 (installed as a snap on Debian 10 and testing on 11). It crashes when clicking on "Open Media". Using --debug it shows error (python3:6120): GLib-GIO-ERROR **: 11:16:59.481: No GSettings schemas are installed on the system

There are a bunch of schemas available as confirmed with gsettings list-schemas. Tried with some environment variables as noted in several places along the Internet (we all know I'm talking about SO): export XDG_DATA_DIRS=/usr/share:~/.local/share/:/usr/share/glib-2.0/schemas/ but it didn't resolve the situation. I also reinstalled gsettings-desktop-schemas and removed/reinstalled the snap (without and with purge option).

Dragging and dropping the file gives a different Python error:

2021-07-29` 11:18 - root - CRITICAL -   File "/snap/vidcutter/56/lib/python3.8/site-packages/vidcutter/__main__.py", line 293, in dropEvent
    self.file_opener(filename)
  File "/snap/vidcutter/56/lib/python3.8/site-packages/vidcutter/__main__.py", line 102, in file_opener
    self.cutter.loadMedia(filename)
  File "/snap/vidcutter/56/lib/python3.8/site-packages/vidcutter/videocutter.py", line 989, in loadMedia
    self.videoService.setMedia(self.currentMedia)
  File "/snap/vidcutter/56/lib/python3.8/site-packages/vidcutter/libs/videoservice.py", line 94, in setMedia
    [stream for stream in self.media.streams if stream.codec_type == codec_type.lower()])
  File "/snap/vidcutter/56/lib/python3.8/site-packages/vidcutter/libs/munch.py", line 104, in __getattr__
    raise AttributeError(k)

2021-07-29 11:18 - root - CRITICAL - <class 'AttributeError'>: streams

Windows version works fine, and I can work the files there, though my main computer is the Linux and I'd like to be able to use it again (it used to work, but I don't recall the version I had before an upgrade that is, possibly, the culprit).

Hope I provided good enough info to start working on this. Let me know what else can I try, I appreciate your looking at the situation.

ozmartian commented 3 years ago

Thx for all the feedback. I'm aware of this issue re Snap but cannot replicate it on my Ubuntu/Debian installs. Hopefully resolved soon.

You can install proper app version via Ubuntu PPA directly, avoiding Snap issues:

$ sudo add-apt-repository ppa:ozmartian/apps
$ sudo apt-get update
$ sudo apt install vidcutter
ProfDavidMora commented 3 years ago

Many thanks for checking in. If I can be of any assistance, let me know, I know a thing of two about programming. I can share my setup with you for a while or anything that might help if you want to take that approach. I'll use the software on Windows while it gets fixed.

ozmartian commented 3 years ago

The issue is Snap specific, not VidCutter itself. I'm sure the Snap works if you open a video file via drag & drop from file manager or "Open With" option in file manager right-click menu. Give that a test, should work. Thx!

ProfDavidMora commented 3 years ago

The offer still stands, if there is anything you want to try; if there is nothing specific to be done, that's what it is.

I did mention drag and drop with the Python error in the initial post, it is not working either. I just tried the context menu, but nothing happened; then I tried command line and it showed the same Python error.

$ vidcutter --debug FileName.mkv
(...)
2021-07-30 08:31 - root - CRITICAL -   File "/snap/vidcutter/56/bin/vidcutter", line 8, in <module>
    sys.exit(main())
  File "/snap/vidcutter/56/lib/python3.8/site-packages/vidcutter/__main__.py", line 380, in main
    win = MainWindow()
  File "/snap/vidcutter/56/lib/python3.8/site-packages/vidcutter/__main__.py", line 86, in __init__
    self.file_opener(self.video)
  File "/snap/vidcutter/56/lib/python3.8/site-packages/vidcutter/__main__.py", line 102, in file_opener
    self.cutter.loadMedia(filename)
  File "/snap/vidcutter/56/lib/python3.8/site-packages/vidcutter/videocutter.py", line 989, in loadMedia
    self.videoService.setMedia(self.currentMedia)
  File "/snap/vidcutter/56/lib/python3.8/site-packages/vidcutter/libs/videoservice.py", line 94, in setMedia
    [stream for stream in self.media.streams if stream.codec_type == codec_type.lower()])
  File "/snap/vidcutter/56/lib/python3.8/site-packages/vidcutter/libs/munch.py", line 104, in __getattr__
    raise AttributeError(k)

2021-07-30 08:31 - root - CRITICAL - <class 'AttributeError'>: streams

The program is used exclusively with MKV files recorded with OBS, if it matters for anything. Thanks a bunch again.

uttam2707 commented 2 years ago

The issue is Snap specific, not VidCutter itself. I'm sure the Snap works if you open a video file via drag & drop from file manager or "Open With" option in file manager right-click menu. Give that a test, should work. Thx!

On ubuntu 20.04, "Drag and drop" or "open with" options load video. I can create/remove/rearrange clips but as soon as I click the save media button it crashes. The terminal output is give below:

~$ vidcutter Gtk-Message: 21:26:50.520: Failed to load module "canberra-gtk-module" Gtk-Message: 21:26:50.520: Failed to load module "canberra-gtk-module" Qt: Session management error: Could not open network socket propsReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.165\" (uid=1000 pid=13756 comm=\"python3 /snap/vidcutter/62/bin/vidcutter \" label=\"snap.vidcutter.vidcutter (enforce)\") interface=\"org.freedesktop.DBus.Properties\" member=\"GetAll\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1902 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")" nmReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.165\" (uid=1000 pid=13756 comm=\"python3 /snap/vidcutter/62/bin/vidcutter \" label=\"snap.vidcutter.vidcutter (enforce)\") interface=\"org.freedesktop.NetworkManager\" member=\"GetDevices\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1902 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")" "Object path cannot be empty"

(python3:13756): GLib-GIO-ERROR **: 21:27:52.958: No GSettings schemas are installed on the system Trace/breakpoint trap (core dumped)

ozmartian commented 2 years ago

This has been fixed with the latest snap released a few mins ago.

MysticAx0lotl commented 1 year ago

This is still an issue for me unfortunately