surskitt / mopidytermart

Display mopidy album art in the terminal
6 stars 0 forks source link

Have error on startup #1

Open PoSayDone opened 3 years ago

PoSayDone commented 3 years ago
Traceback (most recent call last):
  File "/home/posaydone/.local/bin/mopidytermart", line 8, in <module>
    sys.exit(main())
  File "/home/posaydone/.local/lib/python3.9/site-packages/mopidytermart/mopidytermart.py", line 60, in main
    placement = placement_gen('placement', opts.width)
  File "/home/posaydone/.local/lib/python3.9/site-packages/mopidytermart/mopidytermart.py", line 45, in placement_gen
    placement.visibility = ueberzug.Visibility.VISIBLE
  File "/usr/lib/python3.9/site-packages/ueberzug/lib/v0/__init__.py", line 125, in __setattr__
    super().__setattr__(name, value)
  File "/usr/lib/python3.9/site-packages/ueberzug/lib/v0/__init__.py", line 90, in visibility
    self.__update()
  File "/usr/lib/python3.9/site-packages/ueberzug/lib/v0/__init__.py", line 101, in __update
    self.__canvas.enqueue(_action.AddImageAction(**{
  File "/usr/lib/python3.9/site-packages/ueberzug/lib/v0/__init__.py", line 400, in enqueue
    if not self.__process.responsive:
AttributeError: 'NoneType' object has no attribute 'responsive'
nautilor commented 3 years ago

I found a solution, just take the script the user created and add

scaler=ueberzug.ScalerOption.COVER.value

when creating the client

from

client = get_client(opts.timeout, opts.host, opts.port)

to

client = get_client(opts.timeout, opts.host, opts.port, scaler=ueberzug.ScalerOption.COVER.value)