Giter Site home page Giter Site logo

hongquan / cobang Goto Github PK

View Code? Open in Web Editor NEW
232.0 5.0 23.0 1.23 MB

A QR code scanner desktop app for Linux

License: GNU General Public License v3.0

Python 94.06% Shell 1.13% Meson 4.81%
gstreamer gtk qrcode-scanner qrcode-reader python3 gobject-introspection zbar made-in-vietnam barcode-scanner

cobang's People

Contributors

albanobattistella avatar dependabot[bot] avatar eerielili avatar eregni avatar hongquan avatar kianmeng avatar lgbaldoni avatar vistaus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cobang's Issues

Package it as a Snap

For an easy installation clicking in Software in Ubuntu, which is the first Linux distro for many new users now coming to Linux.

Thanks a million if this could be possible!

Missing file in 0.9.0

❯ cobang

(__main__.py:206362): Gtk-ERROR **: 11:22:25.696: failed to add UI: Failed to open file “/usr/share/cobang/cobang-resp.glade”: No such file or directory
/usr/bin/cobang: line 9: 206362 Trace/breakpoint trap   (core dumped) /usr/bin/python3 -m cobang "$@"

Locale fails to install

I'm attempting to update the AUR package, but it's failing:

==> Starting build()...
+ exec meson setup --prefix /usr --libexecdir lib --sbindir bin --buildtype plain --auto-features enabled --wrap-mode nodownload -D b_lto=true -D b_pie=true CoBang-0.7.0 build
The Meson build system
Version: 0.57.1
Source dir: /build/cobang/src/CoBang-0.7.0
Build dir: /build/cobang/src/build
Build type: native build
Project name: cobang
Project version: 0.7.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python3 found: YES (/usr/bin/python3)
Found pkg-config: /usr/bin/pkg-config (1.7.3)
Dependency python found: YES (pkgconfig)
Run-time dependency glib-2.0 found: YES 2.66.7
Run-time dependency gobject-2.0 found: YES 2.66.7
Run-time dependency gobject-introspection-1.0 found: YES 1.66.1
Run-time dependency gtk+-3.0 found: YES 3.24.26
Program desktop-file-validate found: YES (/usr/bin/desktop-file-validate)
Program appstream-util found: YES (/usr/bin/appstream-util)
Program glib-compile-schemas found: YES (/usr/bin/glib-compile-schemas)
Configuring cobang using configuration
Configuring fallback_version.py using configuration
Program flatpak/meson/postinstall.py found: YES (/build/cobang/src/CoBang-0.7.0/flatpak/meson/postinstall.py)
Build targets in project: 3

Found ninja-1.10.2 at /usr/bin/ninja
ninja: Entering directory `build'
ninja: no work to do.
==> Entering fakeroot environment...
==> Starting package()...
ninja: Entering directory `build'
ninja: no work to do.
Installing subdir /build/cobang/src/CoBang-0.7.0/cobang to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/cobang/prep.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/cobang/__main__.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/cobang/ui.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/cobang/net.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/cobang/messages.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/cobang/resources.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/cobang/common.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/cobang/__init__.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/cobang/logging.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/cobang/app.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/cobang/consts.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Installing /build/cobang/src/CoBang-0.7.0/data/main.glade to /build/cobang/pkg/cobang/usr/share/cobang
Installing /build/cobang/src/CoBang-0.7.0/data/about.glade to /build/cobang/pkg/cobang/usr/share/cobang
Installing /build/cobang/src/CoBang-0.7.0/data/url-display.glade to /build/cobang/pkg/cobang/usr/share/cobang
Installing /build/cobang/src/CoBang-0.7.0/data/wifi-display.glade to /build/cobang/pkg/cobang/usr/share/cobang
Installing /build/cobang/src/CoBang-0.7.0/data/cobang_128.png to /build/cobang/pkg/cobang/usr/share/cobang
Installing /build/cobang/src/CoBang-0.7.0/data/wireframe-image-add.svg to /build/cobang/pkg/cobang/usr/share/cobang
Installing /build/cobang/src/CoBang-0.7.0/data/vn.hoabinh.quan.CoBang.desktop to /build/cobang/pkg/cobang/usr/share/applications
Installing /build/cobang/src/CoBang-0.7.0/data/vn.hoabinh.quan.CoBang.svg to /build/cobang/pkg/cobang/usr/share/icons/hicolor/scalable/apps
Installing /build/cobang/src/CoBang-0.7.0/data/vn.hoabinh.quan.CoBang.appdata.xml to /build/cobang/pkg/cobang/usr/share/metainfo
Installing /build/cobang/src/CoBang-0.7.0/data/vn.hoabinh.quan.CoBang.gschema.xml to /build/cobang/pkg/cobang/usr/share/glib-2.0/schemas
Installing /build/cobang/src/build/exe/cobang to /build/cobang/pkg/cobang/usr/bin
Installing /build/cobang/src/build/fallback_version.py to /build/cobang/pkg/cobang/usr/lib/python3.9/site-packages/cobang
Running custom install script '/usr/bin/meson --internal gettext install --subdir=po --localedir=share/locale --pkgname=cobang'
Running custom install script '/build/cobang/src/CoBang-0.7.0/flatpak/meson/postinstall.py'
install: cannot stat 'po/fil/LC_MESSAGES/cobang.mo': No such file or directory
y'
install: cannot stat 'po/fil/LC_MESSAGES/cobang.mo': No such file or directory

Mention works with barcodes too

Many thanks for this app. I think it would be a good idea if it could be mentioned that it works with 2D barcodes too (presumably it works with all codes that ZBar recognises), e.g. in the Readme, Github about text, Debian/Ubuntu package description, for ease of people finding your app when searching for "barcode".

Segmentation fault (core dumped) in Fedora 36

Running from source I get a core dump, this is the last messages from running with -v

import 'gi._gi' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7f5ba0d41ae0>
# /usr/lib64/python3.10/site-packages/cairo/__pycache__/__init__.cpython-310.pyc matches /usr/lib64/python3.10/site-packages/cairo/__init__.py
# code object from '/usr/lib64/python3.10/site-packages/cairo/__pycache__/__init__.cpython-310.pyc'
# extension module 'cairo._cairo' loaded from '/usr/lib64/python3.10/site-packages/cairo/_cairo.cpython-310-x86_64-linux-gnu.so'
# extension module 'cairo._cairo' executed from '/usr/lib64/python3.10/site-packages/cairo/_cairo.cpython-310-x86_64-linux-gnu.so'
import 'cairo._cairo' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7f5ba0d42f80>
import 'cairo' # <_frozen_importlib_external.SourceFileLoader object at 0x7f5ba0d42c50>
# extension module 'gi._gi_cairo' loaded from '/usr/lib64/python3.10/site-packages/gi/_gi_cairo.cpython-310-x86_64-linux-gnu.so'
# extension module 'gi._gi_cairo' executed from '/usr/lib64/python3.10/site-packages/gi/_gi_cairo.cpython-310-x86_64-linux-gnu.so'
import 'gi._gi_cairo' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7f5ba0d42b00>
import 'gi' # <_frozen_importlib_external.SourceFileLoader object at 0x7f5ba0d401f0>
Segmentation fault (core dumped)

Validating appstream file fails

Log of Meson test suite run on 2021-03-06T15:24:40.973348

Inherited environment: SHELL=/bin/bash COLORTERM=truecolor SUDO_GID=0 TEXTDOMAINDIR=/usr/share/locale SUDO_COMMAND='/bin/bash -c chrootbuild cobang fs' SUDO_USER=root PWD=/build/cobang/src SOURCE_DATE_EPOCH=1615044280 LOGNAME=builduser CXXFLAGS='-march=x86-64 -mtune=generic -O2 -pipe -fno-plt' XAUTHORITY=/run/user/1000/gdm/Xauthority COMMAND_MODE=legacy LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now HOME=/build LANG=en_US.utf8 CPPFLAGS=-D_FORTIFY_SOURCE=2 MAKEFLAGS=-j17 TERM=xterm-256color USER=builduser DISPLAY=:1 SHLVL=2 LC_ALL=en_US.UTF-8 CHOST=x86_64-pc-linux-gnu PATH=/build/.local/bin:/build/.local/bin:/home/yochanan/bin:/home/yochanan/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl CFLAGS='-march=x86-64 -mtune=generic -O2 -pipe -fno-plt' SUDO_UID=0 MAIL=/var/mail/builduser OLDPWD=/build/cobang/src TEXTDOMAIN=pacman-scripts _=/usr/bin/meson 

1/3 Validate desktop file   OK              0.01s
15:24:40 MALLOC_PERTURB_=77 /usr/bin/desktop-file-validate /build/cobang/src/build/../CoBang-0.7.0/data/vn.hoabinh.quan.CoBang.desktop
----------------------------------- output -----------------------------------
/build/cobang/src/build/../CoBang-0.7.0/data/vn.hoabinh.quan.CoBang.desktop: warning: key "Encoding" in group "Desktop Entry" is deprecated
/build/cobang/src/build/../CoBang-0.7.0/data/vn.hoabinh.quan.CoBang.desktop: hint: value "GTK;Office;Graphics;AudioVideo;Video;Scanning;" for key "Categories" in group "Desktop Entry" contains more than one main category; application might appear more than once in the application menu
/build/cobang/src/build/../CoBang-0.7.0/data/vn.hoabinh.quan.CoBang.desktop: hint: value "GTK;Office;Graphics;AudioVideo;Video;Scanning;" for key "Categories" in group "Desktop Entry" contains more than one main category; application might appear more than once in the application menu
/build/cobang/src/build/../CoBang-0.7.0/data/vn.hoabinh.quan.CoBang.desktop: hint: value "GTK;Office;Graphics;AudioVideo;Video;Scanning;" for key "Categories" in group "Desktop Entry" contains more than one main category; application might appear more than once in the application menu
------------------------------------------------------------------------------

2/3 Validate schema file    OK              0.00s
15:24:40 MALLOC_PERTURB_=39 /usr/bin/glib-compile-schemas --strict --dry-run /build/cobang/src/CoBang-0.7.0/data
----------------------------------- output -----------------------------------
------------------------------------------------------------------------------

3/3 Validate appstream file FAIL            0.01s   exit status 1
15:24:40 MALLOC_PERTURB_=253 /usr/bin/appstream-util validate vn.hoabinh.quan.CoBang.appdata.xml
----------------------------------- output -----------------------------------
stdout:
vn.hoabinh.quan.CoBang.appdata.xml: 
stderr:
vn.hoabinh.quan.CoBang.appdata.xml could not be read: Failed to open file “vn.hoabinh.quan.CoBang.appdata.xml”: No such file or directory
------------------------------------------------------------------------------


Summary of Failures:

3/3 Validate appstream file FAIL            0.01s   exit status 1


Ok:                 2   
Expected Fail:      0   
Fail:               1   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   

displayed wifi passwords have max length of 20 characters

I noticed the displayed wifi passwords have a max length of 20 characters. An Italian ISP (TIM) appears to use wifi passwords of 24 characters on their routers, so it might be interesting to increase the max-length of wifi passwords.

Crash on startup

I'm running Arch Linux and I've installed CoBang through the AUR.

When I start CoBang it instantly crashes. This is what the terminal shows me;

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.10/runpy.py", line 146, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/usr/lib/python3.10/site-packages/cobang/__init__.py", line 5, in <module>
    from single_version import get_version
ModuleNotFoundError: No module named 'single_version' 

Not starting at all

Hello,

Using the latest version from master (96742ff), cobang doesn't start at all (debian sid fully updated from 2020/11/25):

$ LANG=C cobang
[E][000053714.272167][core.c:71 core_event_error()] core 0x3854230: proxy 0x38678e0 id:11: bound:47 seq:80 res:-16 (Device or resource busy) msg:"enum params id:3 (Spa:Enum:ParamId:EnumFormat) failed"
[E][000053714.272202][gstpipewiredeviceprovider.c:298 on_core_error()] error id:11 seq:80 res:-16 (Device or resource busy): enum params id:3 (Spa:Enum:ParamId:EnumFormat) failed
Segmentation fault

It seems to be related to pipewire and gstreamer...

From ppa install error

Intall from ppa on Ubuntu 20.04:

cobang: Depends: python3-single-version but will not install
Depends: python3-logbook but will not install
Depends: python3-kiss-headers but will not install

dependencies are not in the Ubuntu repositories

Create Debian packaging script

We don't need to publish CoBang right now, just make a working packaging script, changing the project structure if needed.

Issues in building and packaging

Currently, there are two issues that will make building and packaging for other distros fail:

  • I cannot make meson detect and building translation files (*.po). So build script calling meson will not work.
  • The setup.py doesn't install dependencies (like Babel). It is because recent breaking change of pip make it fail if being called from Debian packaging tool.

So, the current solution is:

  • Use setup.py script.
  • Let your build script install dependencies before running setup.py.

Flatpak broken

After latest update the flatpak is broken.
Terminal log:

flatpak run vn.hoabinh.quan.CoBang
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/app/lib/python3.7/site-packages/cobang/__main__.py", line 17, in <module>
    from .app import CoBangApplication
  File "/app/lib/python3.7/site-packages/cobang/app.py", line 44, in <module>
    from . import ui
ImportError: cannot import name 'ui' from 'cobang' (/app/lib/python3.7/site-packages/cobang/__init__.py)

Flatpak: CoBang doesn't memorise window size

Precondition: CoBang opens with a useful window size - all active elements are accessible.

Action:1 Scan any QR-Code - the result is shown at the bottom of the window, partly invisible.

Action 2: Resize the window to make all active elements accessible again. Then close the application.

Problem: At next start of CoBang it is in the same state as in "Precondition".

Expected: The adapted window size from step "Action 2" is memorised.

Linux Mint 21.1, Cinnamon, Flatpak installation. Screen resolution 1600 x 900

Add license file

Hi,
nice to see a new QR GUI app.

Could you add a license file to the project? So potential contributors and users know how they can use the or contribute to the program.

Thanks

Crash when running inside Flatpak (v0.9+)

Since v0.9, I cannot distribute CoBang as Flatpak, because CoBang crashes right after the webcam video plays. Tried downgrading GStreamer version to v1.16 but it still crashes.

GUI: Headerbar based Mockup

Hello,

after reading the reddit thread, with the message about using header bars. I thought I try to come up with an idea how the application could use them.

This is just a WIP to try out some ideas. There are several issues (colours, alignment, icons) and not all functionality is included. I also have several ideas for a phone layout, but this is mostly about reordering elements based on the width of the window.

Do you find this helpful? Is this even a direction of UI you would like go into?

There are two main sections of the application: reading qr codes and creating qr codes. The first one shows three cases: without webcam, one webcam and multiple webcams.

On the right side you see the base layout for qrcode creation. On the left you get the resulting qrcode with visual options below. On the right you select the content type of the qrcode. Based on the type selection you see different "forms" for inputting structured data, just like in qtqr.

cobang-mockup-wip

suggestion

hi, your CoBang app is excellent. please add to the user interface an easy way to copy raw results to the system clipboard (for copy and paste). such as a "Copy" (or Copy Result") button to click. much appreciated. best regards. thanks

Mysterious crash at the first time detecting wifi info

How to reproduce (not always reproducible):

  • Restart PC
  • Open CoBang
  • Open Android phone, chose to share a wifi info under the form of QR code
  • Show the QR code in front of CoBang

What is expected:

  • CoBang show the wifi info in the right sidebar.

What happened:

  • CoBang crashed.

Consider the new version of Pillow (9.X)

Thank you for the development of this application. Currently I'm porting it to Nixpkgs (NixOS/nixpkgs#149729) and I can say it works as intended.

Unfortunately, the only reason I can't merge it yet is because Pillow has been recently updated to version 9.X. Not that I continuously use the application, but it would be something to consider for future versions, if possible.

Thank you!

0.6.2 install fails

Packaging CoBang for openSUSE linux, this is what I see after the last update:

+ /usr/bin/meson install -C noarch-suse-linux --no-rebuild
Relocate to /home/abuild/rpmbuild/BUILD/CoBang-0.6.2
running install
running build
running build_py
running compile_catalog
error: invalid command 'compile_catalog'

Reduce discrepancy of building tools

Due to the need of publishing our app to various channels, the build method are now too diverse:

  • First, we use Poetry both to manage dependency and build, with the pyproject.toml file being the main script for building. However, the 2nd purpose failed, because our app cannot be distributed via PyPI (due to the inclusion of desktop-integration files like icons, *.desktop file).
  • Then, we need to build Debian package. We need to generate setup.py file from pyproject.toml, because Debian doesn't support Poetry.
  • Next, we need to build Faltpak package. Because of it, meson.build is added.

So, we are having 3 build scripts: pyproject.toml, setup.py, meson.build. Pretty cluttering now.

Flatpak can't access gstreamer plugin

I just installed 0.10.1 from flathub, yet it can't access the camera due to these errors:

flatpak run vn.hoabinh.quan.CoBang

(gst-plugin-scanner:6): GStreamer-WARNING **: 18:13:33.395: Failed to load plugin '/app/lib/gstreamer-1.0/libgstva.so': /app/lib/libudev.so.1: version `LIBUDEV_247' not found (required by /usr/lib/x86_64-linux-gnu/libgudev-1.0.so.0)

(gst-plugin-scanner:6): GStreamer-WARNING **: 18:13:33.398: Failed to load plugin '/app/lib/gstreamer-1.0/libgstvideo4linux2.so': /app/lib/libudev.so.1: version `LIBUDEV_247' not found (required by /usr/lib/x86_64-linux-gnu/libgudev-1.0.so.0)

(__main__.py:3): cobang-CRITICAL **: 18:13:33.736: Failed to create Gst Pipeline. Error: gst_parse_error: no element "gtksink" (1)

Reading from an image works, but it doesn't show anything in "results", only in the raw results.

Running on Debian testing with Gnome 44 and on Wayland.

Can't create or remove files in install directory

I tested your latest commit, but it fails:

arch-meson cobang build
+ exec meson setup --prefix /usr --libexecdir lib --sbindir bin --buildtype plain --auto-features enabled --wrap-mode nodownload -D b_lto=true -D b_pie=true cobang build
The Meson build system
Version: 0.54.3
Source dir: /home/yochanan/Documents/AUR/cobang/src/cobang
Build dir: /home/yochanan/Documents/AUR/cobang/src/build
Build type: native build
Project name: cobang
Project version: 0.5.6
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python3 found: YES (/usr/sbin/python3)
Found pkg-config: /usr/sbin/pkg-config (1.7.3)
Run-time dependency python-3.8-embed found: YES 3.8
Run-time dependency glib-2.0 found: YES 2.64.4
Run-time dependency gobject-2.0 found: YES 2.64.4
Run-time dependency gobject-introspection-1.0 found: YES 1.64.1
Run-time dependency gtk+-3.0 found: YES 3.24.21
Run-time dependency libnm found: YES 1.26.0
Run-time dependency gstreamer-1.0 found: YES 1.16.2
Program setup.py found: YES (/home/yochanan/Documents/AUR/cobang/src/cobang/setup.py)
Program desktop-file-validate found: YES (/usr/sbin/desktop-file-validate)
Program appstream-util found: YES (/usr/sbin/appstream-util)
Program glib-compile-schemas found: YES (/usr/sbin/glib-compile-schemas)
Configuring cobang using configuration
Program flatpak/meson/postinstall.py found: YES (/home/yochanan/Documents/AUR/cobang/src/cobang/flatpak/meson/postinstall.py)
Build targets in project: 3
meson compile -C build
Found ninja-1.10.0 at /usr/sbin/ninja
Found runner: ninja
ninja: Entering directory `build'
ninja: no work to do.
DESTDIR="$pkgdir" meson install -C build
ninja: Entering directory `build'
ninja: no work to do.
Installing /home/yochanan/Documents/AUR/cobang/src/cobang/data/main.glade to /home/yochanan/Documents/AUR/cobang/pkg/cobang/usr/share/cobang
Installing /home/yochanan/Documents/AUR/cobang/src/cobang/data/about.glade to /home/yochanan/Documents/AUR/cobang/pkg/cobang/usr/share/cobang
Installing /home/yochanan/Documents/AUR/cobang/src/cobang/data/url-display.glade to /home/yochanan/Documents/AUR/cobang/pkg/cobang/usr/share/cobang
Installing /home/yochanan/Documents/AUR/cobang/src/cobang/data/wifi-display.glade to /home/yochanan/Documents/AUR/cobang/pkg/cobang/usr/share/cobang
Installing /home/yochanan/Documents/AUR/cobang/src/cobang/data/cobang_128.png to /home/yochanan/Documents/AUR/cobang/pkg/cobang/usr/share/cobang
Installing /home/yochanan/Documents/AUR/cobang/src/cobang/data/wireframe-image-add.svg to /home/yochanan/Documents/AUR/cobang/pkg/cobang/usr/share/cobang
Installing /home/yochanan/Documents/AUR/cobang/src/cobang/data/vn.hoabinh.quan.CoBang.desktop to /home/yochanan/Documents/AUR/cobang/pkg/cobang/usr/share/applications
Installing /home/yochanan/Documents/AUR/cobang/src/cobang/data/vn.hoabinh.quan.CoBang.svg to /home/yochanan/Documents/AUR/cobang/pkg/cobang/usr/share/icons/hicolor/scalable/apps
Installing /home/yochanan/Documents/AUR/cobang/src/cobang/data/vn.hoabinh.quan.CoBang.appdata.xml to /home/yochanan/Documents/AUR/cobang/pkg/cobang/usr/share/metainfo
Installing /home/yochanan/Documents/AUR/cobang/src/cobang/data/vn.hoabinh.quan.CoBang.gschema.xml to /home/yochanan/Documents/AUR/cobang/pkg/cobang/usr/share/glib-2.0/schemas
Installing /home/yochanan/Documents/AUR/cobang/src/build/exe/cobang to /home/yochanan/Documents/AUR/cobang/pkg/cobang/usr/bin
Running custom install script '/home/yochanan/Documents/AUR/cobang/src/cobang/setup.py install --prefix /usr'
running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/usr/lib/python3.8/site-packages/test-easy-install-327599.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/lib/python3.8/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://setuptools.readthedocs.io/en/latest/easy_install.html

Please make the appropriate changes for your system and try again.

Camera not working on Pinephone

I am running CoBang on a Pinephone with Arch Linux and Phosh.
Starting CoBang from the command line (SSH) shows:
$ cobang

(main.py:12121): GStreamer-CRITICAL **: 08:43:05.970: gst_element_message_full_with_details: assertion GST_IS_ELEMENT (element) failed

(main.py:12121): GStreamer-CRITICAL **: 08:43:05.971: gst_element_message_full_with_details: assertion GST_IS_ELEMENT (element) failed

There is no video and it seems that only one of the cameras has been identified

screenshot

According to the wiki

The PinePhone has two cameras, OmniVision OV5640 with 5MP (up to 2592 x 1944 pixels) as rear camera and GalaxyCore GC2145 with 2MP (up to 1600 x 1200 pixels) as front camera.

Both cameras work with Megapixel.

Drop Cheese from dependencies

We are using CameraDeviceMonitor from Cheese to catch the event when webcam device is plugged or unplugged.

But it adds a burden to Flatpak building task. We don't use the whole Cheese app, but only a part of its library. While making deb package, it is just as easy as adding "gir1.2-cheese-3.0" to dependencies list, it is not the same when building Flatpak, we have to guide flatpak-builder to build Cheese from source.

So, it is better to implement "device monitor" from plain GStreamer and drop Cheese.

Standalone Executable?

Just for the sake of testing, making a a standalone executable(AppImage or Pyinstaller) might beneficial. Adding a PPA just for trying is a bit cumbersome. And not everybody has Flatpak setup.

Package it as a Flatpak

I really like this project and that it's a native GTK app without a dependency on X. Sadly I'm not on Ubuntu and I understand that I'd be too big of a hassle to package it for all the relevant distros out there. So could you package it as a Flatpak besides a native Ubuntu package please? That way all the people on the many distros that support Flatpak out of the box could easily find it in their software centers. That would also make it work on Silverblue :D

Not possible to scan more than one QR code

Precondition:

After start of the application it is instantly ready to decode a QR-Code - this works fine. In case of an URL it can be clicked and Web Browser opens as expected.

Camera picture still shows the "scene" (frozen picture) of the moment when CoBang decoded the presented code.

Problem 1: It seems not possible to scan another QR-Code right now.

Action:

Switch decoding from camera to file and back to camera

Problem 2: CoBang now receives new frames from the camera (life picture), but does not decode QR-code anymore.

Workaround: Close and restart CoBang

Proposal: Add a button to start a new decoding process.

Linux Mint 21.1, Cinnamon, Flatpak installation

Can't make video work

Packaged 0.8.0 on openSUSE Tumbleweed, application start and it loads and properly decodes a file, but it doesn't show anything in the video tab.

This is what I see on startup:

** (__main__.py:7269): WARNING **: 18:36:19.319: AT-SPI: Could not obtain desktop path or name


** (__main__.py:7269): WARNING **: 18:36:19.325: atk-bridge: get_device_events_reply: unknown signature

** (__main__.py:7269): WARNING **: 18:36:19.326: atk-bridge: get_device_events_reply: unknown signature

** (__main__.py:7269): WARNING **: 18:36:19.326: atk-bridge: GetRegisteredEvents returned message with unknown signature

** (__main__.py:7269): WARNING **: 18:36:19.487: AT-SPI: Could not obtain desktop path or name


** (__main__.py:7269): WARNING **: 18:36:19.744: AT-SPI: Could not obtain desktop path or name


** (__main__.py:7269): WARNING **: 18:36:19.761: AT-SPI: Could not obtain desktop path or name


** (__main__.py:7269): WARNING **: 18:36:19.763: AT-SPI: Could not obtain desktop path or name


** (__main__.py:7269): WARNING **: 18:36:19.785: AT-SPI: Could not obtain desktop path or name


** (__main__.py:7269): WARNING **: 18:36:19.793: AT-SPI: Could not obtain desktop path or name


** (__main__.py:7269): WARNING **: 18:36:19.793: AT-SPI: Could not obtain desktop path or name

What could be possibly missing?

Full disclosure: I'm using a simulated webcam via v4l2loopback. It creates /dev/video0 and according to strace, CoBang is opening it. It also works from a web browser.

Backend 'poetry.masonry.api' is not available.

Build fails:

===>  Building for py39-cobang-0.9.10
* Getting build dependencies for wheel...

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pep517/wrappers.py", line 319, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pep517/in_process/_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'poetry.masonry'

ERROR Backend 'poetry.masonry.api' is not available.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/cobang

poetry-1.3.2 (the latest version) is installed, but it only provides one executable 'poetry'.

Is there a mistake in pyproject.toml?

Version: 0.9.10
Python-3.9
FreeBSD 13.1

Flatpak version is outdated

Other distributions then Ubuntu are advised to install the flatpak-version of CoBang, but the version in flatpak is outdated.

Is there a reason for this ?

Can you need help with publishing it on flatpak ?

GNOME 44 runtime available

Just saw this app on my shrinking flatpak list --app-runtime=org.gnome.Platform//43 output, nothing too urgent though :)

App doesn't start, missing dependencies

Installing the software per this

gives

$ cobang 
Traceback (most recent call last):
  File "/usr/bin/cobang", line 11, in <module>
    load_entry_point('cobang==0.5.6', 'console_scripts', 'cobang')()
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 488, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 2861, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 2461, in load
    return self.resolve()
  File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 2467, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/cobang/__main__.py", line 17, in <module>
    from .app import CoBangApplication
  File "/usr/lib/python3/dist-packages/cobang/app.py", line 34, in <module>
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available

thus making it unstartable.

Then after finding this and doing

sudo apt-get install gir1.2-rsvg-2.0 python3-cairo python-gi-cairo python3-gi

the app was startable.

It seems you're missing some dependencies in the PPA install?


Extra info

$ lsb_release -a
#No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.2 LTS
Release:	20.04
Codename:	focal
$ python3 -V
Python 3.8.5

Cobang on Arch

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?

Migrate to GTK 4 + Libadwaita

Before adding QR code generation feature, before making UI more complex, let's move on the latest UI technology, so that the job of refactoring UI code less difficult.

Also, let's use Blueprint as language for UI. XML is too verbose. When using GTK 4 and Blueprint, we have to have a step to build UI files, so the current approach of running Python app in development have to be changed, we cannot run directly in-develop source file anymore. So how the new project structure should be? We can take https://gitlab.gnome.org/GabMus/swatch as reference.

Unicode characters not showed

If scanned QR code has some specials lowercase characters (like é, à, ä, etc). CoBang doesn't handle it correctly.
I'm using CoBang 0.9.6 on Manjaro.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.