gstd-1.x
gstd-1.x copied to clipboard
Pygstc erroneous exception raised
When trying to connect to GSTD if not connected I received an unexpected Exception
Code I ran without the GST Daemon running:
# Create a custom logger with loglevel=DEBUG
self.gstd_logger = CustomLogger('simple_playback', loglevel='WARNING')
# Create the client with the logger
self.gstc = GstdClient(logger=self.gstd_logger)
2020-05-07 11:48:29,601 ERROR GSTD socket error
2020-05-07 11:48:29,601 ERROR GStreamer Daemon failed to respond
2020-05-07 11:48:29,601 ERROR GSTD socket error
2020-05-07 11:48:29,601 ERROR list_pipelines error: TypeError
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/pygstc/gstc.py", line 222, in _send_cmd_line
result = json.loads(jresult)
File "/usr/lib/python3.6/json/__init__.py", line 348, in loads
'not {!r}'.format(s.__class__.__name__))
TypeError: the JSON object must be str, bytes or bytearray, not 'NoneType'
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/pygstc/gstc.py", line 222, in _send_cmd_line
result = json.loads(jresult)
File "/usr/lib/python3.6/json/__init__.py", line 348, in loads
'not {!r}'.format(s.__class__.__name__))
TypeError: the JSON object must be str, bytes or bytearray, not 'NoneType'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/aarias/Documents/SW/gstd-1.x/examples/pygstc/simple_pipeline.py", line 151, in <module>
if(not myPlayer.openVideo(sys.argv[1])):
File "/home/aarias/Documents/SW/gstd-1.x/examples/pygstc/simple_pipeline.py", line 26, in openVideo
if (self.pipe_exists(self.pipeName)):
File "/home/aarias/Documents/SW/gstd-1.x/examples/pygstc/simple_pipeline.py", line 117, in pipe_exists
existing_pipes = self.gstc.list_pipelines()
File "/usr/local/lib/python3.6/dist-packages/pygstc/gstc.py", line 718, in list_pipelines
result = self._send_cmd_line(['list_pipelines'])
File "/usr/local/lib/python3.6/dist-packages/pygstc/gstc.py", line 227, in _send_cmd_line
raise GstcError(type(exception).__name__)
pygstc.gstcerror.GstcError: TypeError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/aarias/Documents/SW/gstd-1.x/examples/pygstc/simple_pipeline.py", line 197, in <module>
print("GStreamer Client failed with code: "+err, file=sys.stderr)
TypeError: must be str, not GstcError