soonum / hubangl

A free/libre and easy to use streaming software.
GNU General Public License v3.0
17 stars 3 forks source link

program doesn't start when no camera is plugged in? #1

Closed leaf-node closed 7 years ago

leaf-node commented 7 years ago

If I don't have a camera plugged in, I get this errror:

andrew@host:~/src/lp/hubangl/user_interface$ python3 main_window.py 

** (main_window.py:4444): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-BVA9FtvmrI: Connection refused

(main_window.py:4444): GdkPixbuf-CRITICAL **: gdk_pixbuf_new_from_file: assertion 'filename != NULL' failed
../backend/process.py:98: Warning: g_error_free: assertion 'error != NULL' failed
  self.image_overlay.set_property("location", DEFAULT_IMAGE)
Traceback (most recent call last):
  File "main_window.py", line 481, in <module>
    MainWindow()
  File "main_window.py", line 63, in __init__
    self.current_app = BaseApp(self.window, "standalone")
  File "main_window.py", line 349, in __init__
    self.feed = feed.NewFeed(mode)
  File "/home/andrew/src/lp/hubangl/user_interface/feed.py", line 79, in __init__
    self.pipeline = self.create_pipeline_instance(mode)
  File "/home/andrew/src/lp/hubangl/user_interface/feed.py", line 126, in create_pipeline_instance
    return process.Pipeline()
  File "../backend/process.py", line 146, in __init__
    self.video_sources = self.create_video_sources()
  File "../backend/process.py", line 841, in create_video_sources
    video_devices = iofetch.find_usbcam()
  File "../backend/iofetch.py", line 136, in find_usbcam
    dev_infopath = [VIDEO_DEVICE_PATH + dev for dev in listdir(VIDEO_DEVICE_PATH)]
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/video4linux/'
soonum commented 7 years ago

@sudoman I didn't implement the case when there is not camera available, yet...

soonum commented 7 years ago

This commit 78109e5 fix this issue. I'm closing the ticket.