mkchromecast
mkchromecast copied to clipboard
Crashes when asking for systray
mkchromecast works fine except if I pass "-t" option, in which case I get:
$mkchromecast -t
/usr/share/mkchromecast/mkchromecast/cast.py:111: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if iface is not None and iface[0]['addr'] is not '127.0.0.1':
Mkchromecast v0.3.8.1
/usr/share/mkchromecast/mkchromecast/systray.py:797: SyntaxWarning: "is" with a literal. Did you mean "=="?
if platform is 'Darwin':
/usr/share/mkchromecast/mkchromecast/systray.py:803: SyntaxWarning: "is" with a literal. Did you mean "=="?
if platform is 'Linux':
/usr/share/mkchromecast/mkchromecast/systray.py:864: SyntaxWarning: "is" with a literal. Did you mean "=="?
if platform is 'Darwin' and self.notifications is 'enabled':
/usr/share/mkchromecast/mkchromecast/systray.py:864: SyntaxWarning: "is" with a literal. Did you mean "=="?
if platform is 'Darwin' and self.notifications is 'enabled':
Selected backend: /usr/bin/parec
Selected audio codec: mp3
Default bitrate used: 192k
Default sample rate used: 44100Hz.
Traceback (most recent call last):
File "/bin/mkchromecast", line 283, in <module>
mk()
File "/bin/mkchromecast", line 59, in __init__
self.start_tray()
File "/bin/mkchromecast", line 280, in start_tray
mkchromecast.systray.main()
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 910, in main
menubar()
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 173, in __init__
self.createUI()
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 178, in createUI
self.ag = QtWidgets.QActionGroup(self, exclusive=True)
TypeError: 'exclusive' is an unknown keyword argument
I use 0.3.8.1 version from the AUR under ArchLinux.
Same issue here:
» lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bullseye/sid
Release: unstable
Codename: sid
» mkchromecast -t 1 [08:07:49]
Mkchromecast v0.3.8.1
Selected backend: /usr/bin/parec
Selected audio codec: mp3
Default bitrate used: 192k
Default sample rate used: 44100Hz.
Traceback (most recent call last):
File "/usr/bin/mkchromecast", line 283, in <module>
mk()
File "/usr/bin/mkchromecast", line 59, in __init__
self.start_tray()
File "/usr/bin/mkchromecast", line 280, in start_tray
mkchromecast.systray.main()
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 900, in main
menubar()
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 164, in __init__
self.createUI()
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 169, in createUI
self.ag = QtWidgets.QActionGroup(self, exclusive=True)
TypeError: 'exclusive' is an unknown keyword argument
» mkchromecast [08:07:41]
Mkchromecast v0.3.8.1
Creating Pulseaudio Sink...
Open Pavucontrol and Select the Mkchromecast Sink.
Starting Local Streaming Server
[Done]
Selected backend: parec
Selected audio codec: mp3
Default bitrate used: 192k
Default sample rate used: 44100Hz.
PID of main process: 111614
PID of streaming process: 111637
* Serving Flask app "mkchromecast.audio" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
Traceback (most recent call last):
File "/usr/share/mkchromecast/mkchromecast/cast.py", line 113, in _get_chromecasts
return list(pychromecast.get_chromecasts_as_dict().keys())
AttributeError: module 'pychromecast' has no attribute 'get_chromecasts_as_dict'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/mkchromecast", line 283, in <module>
mk()
File "/usr/bin/mkchromecast", line 53, in __init__
self.audio_linux()
File "/usr/bin/mkchromecast", line 72, in audio_linux
self.cc.initialize_cast()
File "/usr/share/mkchromecast/mkchromecast/cast.py", line 135, in initialize_cast
self.cclist = self._get_chromecasts()
File "/usr/share/mkchromecast/mkchromecast/cast.py", line 115, in _get_chromecasts
self._chromecasts_by_name = {c.name: c for c in
File "/usr/share/mkchromecast/mkchromecast/cast.py", line 115, in <dictcomp>
self._chromecasts_by_name = {c.name: c for c in
AttributeError: 'list' object has no attribute 'name'
@BramFr you are seing the same error as me , downgrade to python3-pychromecast v5.
see as well https://github.com/muammar/mkchromecast/issues/322
Opened as well a few bugs on debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965249 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965250 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965251
KDE Plasma Version: 5.19.4 KDE Frameworks Version: 5.74.0 Qt Version: 5.15.0 Kernel Version: 5.8.3-2-MANJARO Python 3.8.5
Version | 0.3.8.1-2
/usr/bin/mkchromecast -t
/usr/share/mkchromecast/mkchromecast/cast.py:111: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if iface is not None and iface[0]['addr'] is not '127.0.0.1':
Mkchromecast v0.3.8.1
/usr/share/mkchromecast/mkchromecast/systray.py:797: SyntaxWarning: "is" with a literal. Did you mean "=="?
if platform is 'Darwin':
/usr/share/mkchromecast/mkchromecast/systray.py:803: SyntaxWarning: "is" with a literal. Did you mean "=="?
if platform is 'Linux':
/usr/share/mkchromecast/mkchromecast/systray.py:864: SyntaxWarning: "is" with a literal. Did you mean "=="?
if platform is 'Darwin' and self.notifications is 'enabled':
/usr/share/mkchromecast/mkchromecast/systray.py:864: SyntaxWarning: "is" with a literal. Did you mean "=="?
if platform is 'Darwin' and self.notifications is 'enabled':
Selected backend: /usr/bin/parec
Selected audio codec: mp3
Default bitrate used: 192k
Default sample rate used: 44100Hz.
Configuration file exists
Using defaults set there
Traceback (most recent call last):
File "/usr/bin/mkchromecast", line 283, in <module>
mk()
File "/usr/bin/mkchromecast", line 59, in __init__
self.start_tray()
File "/usr/bin/mkchromecast", line 280, in start_tray
mkchromecast.systray.main()
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 910, in main
menubar()
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 173, in __init__
self.createUI()
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 178, in createUI
self.ag = QtWidgets.QActionGroup(self, exclusive=True)
TypeError: 'exclusive' is an unknown keyword argument
Built from mkchromecast-git Version | r1173.2731d8d1-2 Much better!
/usr/bin/mkchromecast -t
Mkchromecast v0.3.9
Selected backend: /usr/bin/parec
Selected audio codec: mp3
Default bitrate used: 192k
Default sample rate used: 44100Hz.
Configuration file exists
Using defaults set there
qt.qpa.xcb: QXcbConnection: XCB error: 5 (BadAtom), sequence: 693, resource id: 0, major code: 20 (GetProperty), minor code: 0
Still a problem the tray item/app dies on completion of search for cast devices. System log shows:
30/08/2020 12:08 kwin_x11 file:///usr/share/kwin/aurorae/MenuButton.qml:22: TypeError: Cannot read property 'closeOnDoubleClickOnMenu' of null
30/08/2020 12:08 kwin_x11 file:///usr/share/kwin/aurorae/MenuButton.qml:22: TypeError: Cannot read property 'closeOnDoubleClickOnMenu' of null
30/08/2020 12:08 kwin_x11 file:///usr/share/kwin/aurorae/MenuButton.qml:22: TypeError: Cannot read property 'closeOnDoubleClickOnMenu' of null
30/08/2020 12:08 kwin_x11 file:///usr/share/kwin/aurorae/MenuButton.qml:22: TypeError: Cannot read property 'closeOnDoubleClickOnMenu' of null
30/08/2020 12:08 kwin_x11 QPainter::begin: Paint device returned engine == 0, type: 3
30/08/2020 12:08 plasmashell file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
30/08/2020 12:08 kwin_x11 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 50117, resource id: 121634847, major code: 18 (ChangeProperty), minor code: 0
30/08/2020 12:08 kwin_x11 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 50122, resource id: 121634847, major code: 12 (ConfigureWindow), minor code: 0
30/08/2020 12:08 kwin_x11 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 50126, resource id: 121634847, major code: 3 (GetWindowAttributes), minor code: 0
30/08/2020 12:08 kwin_x11 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 50128, resource id: 121634847, major code: 8 (MapWindow), minor code: 0
30/08/2020 12:08 kwin_x11 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 50129, resource id: 121634847, major code: 12 (ConfigureWindow), minor code: 0
30/08/2020 12:08 kwin_x11 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 51454, resource id: 18927641, major code: 3 (GetWindowAttributes), minor code: 0
30/08/2020 12:08 kwin_x11 qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 51455, resource id: 18927641, major code: 14 (GetGeometry), minor code: 0
30/08/2020 12:08 kwin_x11 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 53019, resource id: 121634866, major code: 2 (ChangeWindowAttributes), minor code: 0
30/08/2020 12:08 kwin_x11 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 54155, resource id: 18927891, major code: 3 (GetWindowAttributes), minor code: 0
30/08/2020 12:08 kwin_x11 qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 54156, resource id: 18927891, major code: 14 (GetGeometry), minor code: 0
30/08/2020 12:08 plasmashell file:///usr/lib/qt/qml/QtQuick/Controls/Styles/Plasma/ScrollViewStyle.qml:60:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
30/08/2020 12:08 plasmashell file:///usr/lib/qt/qml/QtQuick/Controls/Styles/Plasma/ToolButtonStyle.qml:209:13: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
30/08/2020 12:08 plasmashell file:///usr/lib/qt/qml/QtQuick/Controls/Styles/Plasma/ToolButtonStyle.qml:209:13: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
30/08/2020 12:08 plasmashell file:///usr/lib/qt/qml/QtQuick/Controls/Styles/Plasma/ToolButtonStyle.qml:209:13: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
30/08/2020 12:08 plasmashell file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationHeader.qml:78:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
30/08/2020 12:08 kded5 Registering ":1.155/StatusNotifierItem" to system tray
30/08/2020 12:08 kded5 Service ":1.155" unregistered
Systray also dies for me after selecting a device.
main ✔ $ mkchromecast -t 137 ↵
Mkchromecast v0.3.9
Selected backend: /usr/bin/parec
Selected audio codec: mp3
Default bitrate used: 192k
Default sample rate used: 44100Hz.
List of Devices Available in Network:
-------------------------------------
Index Types Friendly Name
===== ===== =============
0 Sonos Junior Master
1 Sonos Master Bedroom
2 Sonos Master Bathroom
3 Sonos Office
4 Sonos Guest Bedroom
available_devices received
Available Media Streaming Devices [[0, 'Junior Master', 'Sonos', '192.168.1.206'], [1, 'Master Bedroom', 'Sonos', '192.168.1.204'], [2, 'Master Bathroom', 'Sonos', '192.168.1.205'], [3, 'Office', 'Sonos', '192.168.1.201'], [4, 'Guest Bedroom', 'Sonos', '192.168.1.207']]
Selected backend: /usr/bin/parec
Selected audio codec: mp3
Default bitrate used: 192k
Default sample rate used: 44100Hz.
PID of main process: 108078
PID of streaming process: 108112
* Serving Flask app 'mkchromecast.audio' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://192.168.1.177:5000/ (Press CTRL+C to quit)
List of Devices Available in Network:
-------------------------------------
Index Types Friendly Name
===== ===== =============
0 Sonos Master Bedroom
1 Sonos Office
2 Sonos Junior Master
3 Sonos Guest Bedroom
4 Sonos Master Bathroom
Casting to: Office
pcastready ? _play_cast_ failed
Traceback (most recent call last):
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 508, in stop_cast
self.cast.quit_app()
AttributeError: 'NoneType' object has no attribute 'quit_app'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 479, in pcastready
self.stop_cast()
File "/usr/share/mkchromecast/mkchromecast/systray.py", line 512, in stop_cast
self.cast.stop()
AttributeError: 'NoneType' object has no attribute 'stop'
[1] 108078 abort (core dumped) mkchromecast -t
Everything works flawlessly when using mkchromecast -s