Open kokosowy opened 3 years ago
Hi, For a quick fix please see https://github.com/plintx/mopidy-radionet/issues/5#issuecomment-746602563 This patch was merged into the master branch, you can clone it and install manually.
or.... @plintx can you please create a patch release from master having this fix?
Best regards, Gergely
Hi, @kokosowy, @gemolnar79, done ;) https://pypi.org/project/Mopidy-RadioNet/0.2.2/
Wow, thank you! :) 🥳
@gemolnar79 @plintx thank you so much guys for such a quick reaction!! However I think there was another change in code, and it's not documented yet.
gru 31 18:23:57 pirateaudio mopidy[976]: WARNING [MainThread] mopidy.main Found radionet configuration errors. The extension has been automatically disabled: gru 31 18:23:57 pirateaudio mopidy[976]: WARNING [MainThread] mopidy.main radionet/favorite_stations must be set.
Can you tell what does variable "radionet/favorite_stations" do? What kind of value is expected there?
Thanks! Happy new year!
Hey, I was facing with the same error after the upgrade. The verification of that config parameter feels too strict. My quickfix on this is to assign any random value to that parameter in mopidy.conf so loading the module will not fail. (I can share my config snippet here later this week, now I am already at the new year party. :))
Happy New Year to everyone! 😊
Open source community at its finest!! Thanks a lot @gemolnar79! I'm sure we will know how to use this parameter soon. ;-) Have a great eve!
Hi, All credit goes to the developers, thanks @plintx @zelkizwitaminami for making it available. 🙇
@kokosowy this is my radionet config in /etc/mopidy/mopidy.conf
[radionet] enabled = true min_bitrate = 128 favorite_stations = 'x'
I do not talk Python so just guessing that params not having a value are dropped while config files are parseed/validated (Not sure if this is a default Python or Mopidy behavior or the module code is too strict.) @plintx @zelkizwitaminami any idea on this?
(Also the documentation might need some update on the favorite_stations
parameter.)
(I have python=3.8.2. mopidy=3.1.1, and Mopidy-RadioNet=0.2.2 installed.)
Thank you! :)
Hi there,
I'm using v0.2.1 and it seems it doesn't work. When I try to browse radio.net its content is completely blank. In logs I've found this kind of messages:
gru 30 19:39:41 pirateaudio mopidy[476]: ERROR [Core-18] mopidy.core.library RadioNetBackend backend caused an exception. gru 30 19:39:41 pirateaudio mopidy[476]: Traceback (most recent call last): gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn gru 30 19:39:41 pirateaudio mopidy[476]: (self._dns_host, self.port), self.timeout, **extra_kw) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 57, in create_connection gru 30 19:39:41 pirateaudio mopidy[476]: for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo gru 30 19:39:41 pirateaudio mopidy[476]: for res in _socket.getaddrinfo(host, port, family, type, proto, flags): gru 30 19:39:41 pirateaudio mopidy[476]: socket.gaierror: [Errno -2] Name or service not known gru 30 19:39:41 pirateaudio mopidy[476]: During handling of the above exception, another exception occurred: gru 30 19:39:41 pirateaudio mopidy[476]: Traceback (most recent call last): gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen gru 30 19:39:41 pirateaudio mopidy[476]: chunked=chunked) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 343, in _make_request gru 30 19:39:41 pirateaudio mopidy[476]: self._validate_conn(conn) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 841, in _validate_conn gru 30 19:39:41 pirateaudio mopidy[476]: conn.connect() gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 301, in connect gru 30 19:39:41 pirateaudio mopidy[476]: conn = self._new_conn() gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 168, in _new_conn gru 30 19:39:41 pirateaudio mopidy[476]: self, "Failed to establish a new connection: %s" % e) gru 30 19:39:41 pirateaudio mopidy[476]: urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x9ac65630>: Failed to establish a new connection: [Errno -2] Name or service not known gru 30 19:39:41 pirateaudio mopidy[476]: During handling of the above exception, another exception occurred: gru 30 19:39:41 pirateaudio mopidy[476]: Traceback (most recent call last): gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send gru 30 19:39:41 pirateaudio mopidy[476]: timeout=timeout gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen gru 30 19:39:41 pirateaudio mopidy[476]: _stacktrace=sys.exc_info()[2]) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment gru 30 19:39:41 pirateaudio mopidy[476]: raise MaxRetryError(_pool, url, error or ResponseError(cause)) gru 30 19:39:41 pirateaudio mopidy[476]: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='undefined', port=443): Max retries exceeded with url: /info/v2/search/topstations?apikey=8674665fe609f3e9e1c7739eb5d7e6dcc4c1ffd1&_=160 gru 30 19:39:41 pirateaudio mopidy[476]: During handling of the above exception, another exception occurred: gru 30 19:39:41 pirateaudio mopidy[476]: Traceback (most recent call last): gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/mopidy/core/library.py", line 17, in _backend_error_handling gru 30 19:39:41 pirateaudio mopidy[476]: yield gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/mopidy/core/library.py", line 114, in _browse gru 30 19:39:41 pirateaudio mopidy[476]: result = backend.library.browse(uri).get() gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/pykka/_threading.py", line 45, in get gru 30 19:39:41 pirateaudio mopidy[476]: _compat.reraise(*self._data['exc_info']) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/pykka/_compat/__init__.py", line 29, in reraise gru 30 19:39:41 pirateaudio mopidy[476]: raise value gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 193, in _actor_loop gru 30 19:39:41 pirateaudio mopidy[476]: response = self._handle_receive(envelope.message) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 299, in _handle_receive gru 30 19:39:41 pirateaudio mopidy[476]: return callee(*message.args, **message.kwargs) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/local/lib/python3.7/dist-packages/mopidy_radionet/library.py", line 49, in browse gru 30 19:39:41 pirateaudio mopidy[476]: self.backend.refresh() gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/local/lib/python3.7/dist-packages/mopidy_radionet/backend.py", line 44, in refresh gru 30 19:39:41 pirateaudio mopidy[476]: self.radionet.get_top_stations() gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/local/lib/python3.7/dist-packages/mopidy_radionet/radionet.py", line 184, in get_top_stations gru 30 19:39:41 pirateaudio mopidy[476]: response = self.do_post(api_suffix, url_params) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/local/lib/python3.7/dist-packages/mopidy_radionet/radionet.py", line 93, in do_post gru 30 19:39:41 pirateaudio mopidy[476]: params=url_params, data=payload) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/requests/sessions.py", line 581, in post gru 30 19:39:41 pirateaudio mopidy[476]: return self.request('POST', url, data=data, json=json, **kwargs) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request gru 30 19:39:41 pirateaudio mopidy[476]: resp = self.send(prep, **send_kwargs) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send gru 30 19:39:41 pirateaudio mopidy[476]: r = adapter.send(request, **kwargs) gru 30 19:39:41 pirateaudio mopidy[476]: File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send gru 30 19:39:41 pirateaudio mopidy[476]: raise ConnectionError(e, request=request) gru 30 19:39:41 pirateaudio mopidy[476]: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='undefined', port=443): Max retries exceeded with url: /info/v2/search/topstations?apikey=8674665fe609f3e9e1c7739eb5d7e6dcc4c1ffd1&_= lines 118-173/173 (END)
My config section is pretty simple: [radionet] enabled = true language = net min_bitrate = 96
I tried also 'pl' for language but the symptom is pretty much the same.
Is there any change on website you need to take into account or I'm missing something? ;-) Thanks!