sublime-music / sublime-music

A native Gonic/Subsonic/Airsonic/*sonic client for Linux. Built using Python and GTK+.
https://sublimemusic.app
GNU General Public License v3.0
92 stars 9 forks source link

non-functional on FreeBSD with Navidrome server #447

Open llfw opened 6 months ago

llfw commented 6 months ago

i'm trying to run Sublime (0.12.0) on FreeBSD, with a Navidrome 0.50.0 server, but it doesn't work.

the first issue is that on startup, it prints various stacktraces like this:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/sublime_music/ui/albums.py", line 822, in on_artwork_downloaded
    artwork.set_from_file(filename.result())
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 342, in _invoke_callbacks
    callback(self)
  File "/usr/local/lib/python3.10/site-packages/sublime_music/adapters/manager.py", line 520, in future_finished
    AdapterManager._instance.caching_adapter.ingest_new_data(cache_key, param, f.result())
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.10/site-packages/sublime_music/adapters/manager.py", line 109, in _on_future_complete
    self._data = future.result()
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/sublime_music/adapters/manager.py", line 436, in download_fn
    raise Exception("Didn't expect JSON!")
Exception: Didn't expect JSON!

the second issue is that if i navigate to an artist > album, it prints a very long stack trace (apparently caused by an infinite recursion) that ends with this:

  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 895, in _diff_by_forming_pairs_and_comparing_one_by_one
    self._diff(next_level, parents_ids_added, local_tree=local_tree)
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 1583, in _diff
    self._diff_obj(level, parents_ids)
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 450, in _diff_obj
    self._diff_dict(
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 616, in _diff_dict
    self._diff(next_level, parents_ids_added, local_tree=local_tree)
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 1583, in _diff
    self._diff_obj(level, parents_ids)
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 450, in _diff_obj
    self._diff_dict(
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 616, in _diff_dict
    self._diff(next_level, parents_ids_added, local_tree=local_tree)
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 1577, in _diff
    self._diff_iterable(level, parents_ids, _original_type=_original_type, local_tree=local_tree)
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 663, in _diff_iterable
    self._diff_iterable_in_order(level, parents_ids, _original_type=_original_type, local_tree=local_tree)
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 792, in _diff_iterable_in_order
    self._diff_by_forming_pairs_and_comparing_one_by_one(
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 895, in _diff_by_forming_pairs_and_comparing_one_by_one
    self._diff(next_level, parents_ids_added, local_tree=local_tree)
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 1526, in _diff
    if self._skip_this(level):
  File "/usr/local/lib/python3.10/site-packages/deepdiff/diff.py", line 465, in _skip_this
    level_path = level.path()
  File "/usr/local/lib/python3.10/site-packages/deepdiff/model.py", line 707, in path
    item = next_rel.get_param_repr(force)
  File "/usr/local/lib/python3.10/site-packages/deepdiff/model.py", line 858, in get_param_repr
    return self.stringify_param(force)
  File "/usr/local/lib/python3.10/site-packages/deepdiff/model.py", line 885, in stringify_param
    resurrected = literal_eval_extended(candidate)
  File "/usr/local/lib/python3.10/site-packages/deepdiff/helper.py", line 603, in literal_eval_extended
    return literal_eval(item)
  File "/usr/local/lib/python3.10/ast.py", line 64, in literal_eval
    node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval')
  File "/usr/local/lib/python3.10/ast.py", line 43, in parse
    if isinstance(feature_version, tuple):
RecursionError: maximum recursion depth exceeded while calling a Python object

if i try to play a track, it prints the same stacktrace, then either doesn't play anything (the scrubber sits at 0:00), or crashes with this error:

RecursionError: maximum recursion depth exceeded while calling a Python object
Gdk-Message: 14:14:49.614: Lost connection to Wayland compositor.

using:

llfw commented 6 months ago

with PR #448, Sublime now works on FreeBSD.

the errors about "Didn't expect JSON" are still there but don't seem to affect functionality, so this issue can probably be closed if the PR is merged.

i've submitted a FreeBSD port for Sublime: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275959