Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running the demo commands #5

Closed
vincit-haihala opened this issue Aug 31, 2021 · 5 comments
Closed

Error while running the demo commands #5

vincit-haihala opened this issue Aug 31, 2021 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@vincit-haihala
Copy link

$ webcam-filters --input-dev /dev/video0 --output-dev /dev/video3 --background-blur 150

Traceback (most recent call last):
  File "/home/eeroh/.local/bin/webcam-filters", line 8, in <module>
    sys.exit(cli())
  File "/home/eeroh/.local/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/home/eeroh/.local/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/home/eeroh/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/eeroh/.local/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/home/eeroh/.local/lib/python3.9/site-packages/webcam_filters/main.py", line 137, in cli
    add_filters(
  File "/home/eeroh/.local/lib/python3.9/site-packages/webcam_filters/gst.py", line 68, in add_filters
    for c in caps:
TypeError: 'Caps' object is not iterable
@tmsnvd
Copy link

tmsnvd commented Aug 31, 2021

same here, ubuntu 21, python 3.9

@jgrgt
Copy link

jgrgt commented Aug 31, 2021

I got past that after installing python3-gst-1.0. Now I get:

Traceback (most recent call last):
  File "/home/jgrgt/.local/bin/webcam-filters", line 8, in <module>
    sys.exit(cli())
  File "/home/jgrgt/.local/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/home/jgrgt/.local/lib/python3.8/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/home/jgrgt/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/jgrgt/.local/lib/python3.8/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/main.py", line 137, in cli
    add_filters(
  File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/gst.py", line 87, in add_filters
    structs = sorted(
  File "/home/jgrgt/.local/lib/python3.8/site-packages/webcam_filters/gst.py", line 90, in <lambda>
    Fraction(str(x.get_value("framerate"))),
  File "/usr/lib/python3.8/fractions.py", line 137, in __new__
    raise ValueError('Invalid literal for Fraction: %r' %
ValueError: Invalid literal for Fraction: '{5/1,5/1}'

Edit: Ubuntu 20.04

@steveharriss
Copy link

Exactly the same errors on 5.13.12-artix1-1. Python 3.9.6. Initially got the 'TypeError: 'Caps' object is not iterable'.

Then installed gst-python-1.18.4-1-x86_64 and get the 'Invalid literal for Fraction:' error.

Only difference being:

File "/usr/lib/python3.9/fractions.py", line 115, in __new__
    raise ValueError('Invalid literal for Fraction: %r' %
ValueError: Invalid literal for Fraction: '{30/1,15/1}'

@jgrgt
Copy link

jgrgt commented Aug 31, 2021

There's a workaround for the fraction issue in #3

@jashandeep-sohi jashandeep-sohi added the documentation Improvements or additions to documentation label Sep 1, 2021
@jashandeep-sohi
Copy link
Owner

Closing. The fraction bug is fixed and if you're still having problems with dependencies, try installing with Nix:

nix-env --file https://github.com/jashandeep-sohi/webcam-filters/archive/refs/tags/v0.2.2.tar.gz --install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants