Skip to content

UnboundLocalError: local variable 'error' referenced before assignment #12

@Itookmyprozac

Description

@Itookmyprozac

Hi,

Now on Manjaro, on a 64-bit system, after installing miniplayer via yay -S, I can't execute miniplayer:

Traceback (most recent call last):
  File "/usr/bin/miniplayer", line 794, in loop
    self.draw()
  File "/usr/bin/miniplayer", line 751, in draw
    self.drawPlaylist()
  File "/usr/bin/miniplayer", line 622, in drawPlaylist
    f"{playlist_item['artist']} - {playlist_item['title']}"[:self.playlist_window_width - 1],
KeyError: 'artist'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/miniplayer", line 828, in <module>
    player.loop()
  File "/usr/lib/python3.9/site-packages/ueberzug/lib/v0/__init__.py", line 378, in decorator
    return function(*args, canvas=self, **kwargs)
  File "/usr/bin/miniplayer", line 822, in loop
    if error:
UnboundLocalError: local variable 'error' referenced before assignment

I tried to install miniplayer using pip but I received the same message as I received in another laptop (see this issue).

My miniplayer config:

cat /home/itook/.config/miniplayer/config

[player]
music_directory = /home/itook/Musica
font_width = 11
font_height = 24
image_method = ueberzug
volume_step = 5
auto_close = false
album_art_only = false
show_playlist = true

[mpd]
host = localhost
port = 6601
# pass = example

# [keybindings]
> = next_track
< = last_track
+ = volume_up
- = volume_down
p = play_pause
q = quit
h = help
i = toggle_info

cat .mpd/config:

music_directory "~/Musica/"
playlist_directory "~/Musica/"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
pid_file "~/.mpd/mpd.pid"
state_file "~/.mpd/mpdstate"
audio_output {
	type "pulse"
	name "pulse audio"
}
audio_output {
    type                    "fifo"
    name                    "my_fifo"
    path                    "/tmp/mpd.fifo"
    format                  "44100:16:2"
}

bind_to_address "127.0.0.1"
port "6601"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions