1

I am receiving this error after running a Video stream in a QtMultimedia

this is the error message

GStreamer; Unable to play - "" Error: "Invalid URI \"\"." Traceback (most recent call last):

Kikomi
  • 49
  • 9
  • 2
    You should be getting an error message that starts with `Traceback (most recent call last)` and ends with something like `NameError: ...` or `UnboundLocalError: ...`. Can you provide the *full* error message? – Giacomo Alzetta Nov 19 '19 at 12:16
  • this is the error message d1 = threading.Thread(target=self.dep1) NameError: name 'self' is not defined – Kikomi Nov 19 '19 at 12:18
  • 1
    `d1 = threading ...` needs to be in a function. Just a note: Use QThreads instead of Python threads when working with QT. – Maurice Meyer Nov 19 '19 at 12:21
  • Thanks @MauriceMeyer – Kikomi Nov 19 '19 at 12:26
  • @Kikomi 1) remove `d1 = ...`, 2) call `self.dep1()` in `__init__` of ASD and 3) remove all X.join() – eyllanesc Nov 19 '19 at 14:09

1 Answers1

1

self is only defined (that too explicitly) only in instance methods. And class doesn't exist while it is being created.

class ASD(MainProg):
    # ...
    d1 = threading.Thread(target=self.dep1) # self won't be defined here.
hspandher
  • 15,934
  • 2
  • 32
  • 45