hongquan / CoBang

A QR code scanner desktop app for Linux
GNU General Public License v3.0
243 stars 28 forks source link

Cobang on Arch #20

Closed simdens closed 3 years ago

simdens commented 3 years ago

I am trying to get cobang running on Arch Linux but it is throwing the error Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/cobang/app.py", line 597, in on_new_webcam_sample img = zbar.Image(width, height, 'Y800', mapinfo.data) TypeError: expected bytes, memoryview found

Am I missing any dependencies or is this an cobang issue?

hongquan commented 3 years ago

@simdens Seems to be mismatch dependency. Maybe different version of GStreamer. Could you list the dependencies in your environment (zbar, GStreamer, GTK)? I'm not used to Arch, so I don't know how it resolves the dependencies. I develop and tested on Ubuntu 20.04, which has GStreamer v1.16.2, zbar v0.23.

hongquan commented 3 years ago

And also, is there an equivalent of python3-gst package on ArchLinux? According to https://lazka.github.io/pgi-docs/Gst-1.0/classes/MapInfo.html#fields, the mapinfo.data should be bytes type. I don't know why in your machine, it becomes memoryview.

simdens commented 3 years ago

@hongquan I am using GStreamer 1.18.0 and zbar 0.23.1. Dependencies are:

Don't know if it is equivalent to python3-gst on ubuntu, but I am using the "gst-python" package in version 1.18.0

hongquan commented 3 years ago

@simdens I look into GStreamer v1.18 and see the difference in gst-python, where they "override" the MapInfo class https://gitlab.freedesktop.org/gstreamer/gst-python/-/blob/1.18/gi/overrides/Gst.py#L599 (it doesn't exist in v1.16)

Though I don't have GStreamer v1.18 on my machine, I will try a blind fix (I haven't been successful with installing ArchLinux in VirtualBox, the installer just hangs with black screen).

simdens commented 3 years ago

@hongquan Nice to hear. If I can help with testing. Just let me know. Perhaps a docker container with Arch will help you during development: https://hub.docker.com/_/archlinux/

hongquan commented 3 years ago

@simdens I've just pushed the change (76b8bf2). But don't know how to build it for ArchLinux.

@yochananmarqos Could you help?

simdens commented 3 years ago

@hongquan I just recompiled it with the changes in app.py and now it works. Thanks :+1:

yochananmarqos commented 3 years ago

The AUR package is updated with that commit and working well. :+1:

hongquan commented 3 years ago

Thanks.