plotbitrate icon indicating copy to clipboard operation
plotbitrate copied to clipboard

Fails on WSL.

Open paperclipstudio opened this issue 1 year ago • 2 comments

Great program but just something that I've noticed When running on WSL we get an error saying Error: No module named 'tkinter' Which is expected but if you run it without any GUI with plotbitrate -f png -o out.png MerryChristmas.mp4

Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, vkkhrdisplay, wayland-egl, vnc, minimalegl, xcb, minimal, offscreen, wayland, eglfs.

Aborted (core dumped)

Which isn't expected as I believe that it doesn't need to load any Qt to run this command right?

Many thanks, this has been super useful.

paperclipstudio avatar Dec 19 '24 11:12 paperclipstudio

That sure doesn't look like the behavior you would expect, as you said. I can take a look early next week to see if the display related aspects can be guarded better when writing to a file.

zeroepoch avatar Dec 19 '24 15:12 zeroepoch

@paperclipstudio, sorry it took so long to get back to you. I was thinking we needed some way to disable the graphical backend for Matplotlib when you want to only create an image. When I finally got a chance to do some experiments and looked at the code I see we implemented this already a while ago. I tried in a Linux container where there isn't a graphical display available and I was able to use the command you provided to save an image without an error. I didn't have Qt installed in the container to make sure it wouldn't try to use it. When I did install the Qt backend and didn't save the image to a file it failed since it was unable to open a graphical display as expected.

I know a Linux container is not the same as WSL, but I used it as a proxy since it was quickly available to me. Maybe we can gather a few pieces of information first to see if there is something interesting with your environment.

  • Can you provide the output of uname -a in your WSL terminal?
    • It almost looks like it's not detecting WSL properly which avoids the Qt backend
    • It should contain microsoft somewhere in the output
  • What version of plotbitrate are you using?
  • What version of matplotlib are you using?

zeroepoch avatar Mar 30 '25 08:03 zeroepoch