GeorgeFilipkin / pulsemixer

CLI and curses mixer for PulseAudio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pulsemixer won't run, addwstr() error

HarveyDoom opened this issue · comments

Can you make it any bigger?
addwstr() returned ERR

This error is displayed when I attempt to run the script, pulsemixer was working yesterday and I don't believe I changed anything.

oddly pulsemixer -h still displays the help menu...

Linux Mint 17.2 Python 3.4.3 installed Pulseaudio 4.0

21     def run(self, scr):
20         signal.signal(signal.SIGINT, lambda signal, frame: sys.exit(0))
19         while True:
18             try:
17                 self.check_resize()
16                 if not self.submenu_show:
15                     self.get_data()
14                     self.update_menu()
13                     self.update_info()
12                     self.display()
11                     if self.helpwin_show:
10                         self.display_helpwin()
 9                         self.run_helpwin()
 8                         continue
 7                 elif self.change_mode_allowed:
 6                     self.display_submenu()
 5                     self.run_submenu()
 4                     continue
 3             except (curses.error, IndexError) as e:
 2                 self.screen.erase()
 1                 self.screen.addstr('Can you make it any bigger?\n')

1359 self.screen.addstr(str(e))

I just pushed a new version into master, care to give it a try and see if the issue is still there? Also made this error to be more verbose, so I would have more info to go on with in case it hasn't been fixed.

Terminal might be too small 66:115
{0: 1, 1: 0, 2: 0}
addwstr() returned ERR
[('./pulsemixer', 1343, 'run', 'self.display()'), ('./pulsemixer', 1693, 'display', 'self.display_line(index + 1, t
ree + "|0\n" + line)'), ('./pulsemixer', 1267, 'display_line', 'self.screen.addstr(index, shift, p1, int(p[-1]) |
mod)')]

New error!

This bug has been around for a while now and I've never managed to reproduce it, but thought I've managed to fix it blindly. Apparently not. It happens when pulsemixer for some reason tries to render a string outside of the terminal.

So, you will have to test it for me again. How about this one?

Terminal might be too small 49:185
{0: 1, 1: 0, 2: 0}
addnwstr() returned ERR
[('/home/chris/bin/pulsemixer', 1346, 'run', 'self.display()'), ('/home/chris/bin/pulsemixer', 1696, 'display', 'self.display_line(index + 1, tree + "|0\n" + line)'), ('/home/chris/bin
/pulsemixer', 1269, 'display_line', 'self.screen.addnstr(index, shift, p1, max(0, m), int(p[-1]) | mod)')]

No luck buddy :(

Terminal might be too small 92:52
98:1
{0: 1, 1: 0, 2: 0}
addnwstr() returned ERR
[('/home/chris/bin/pulsemixer', 1350, 'run', 'self.display()'), ('/home/chris/bin/pulsemixer
', 1700, 'display', 'self.display_line(index + 1, tree + "|0\n" + line)'), ('/home/chris/bi
n/pulsemixer', 1273, 'display_line', 'self.screen.addnstr(min(curses.LINES - 1, index), shif
t, p1, max(0, m), int(p[-1]) | mod)')]

Hm. Care to try export PULSEMIXER_BAR_STYLE="┌─┐-└┘=- ──"; python3 ./pulsemixer? Might have something to do with that symbol.

Also, what terminal and fonts are you using?

Should be fixed now, see #15 for details.

Yep, this has fixed the problem! Well done mate, thanks alot!

I'm still having this issue, even with the latest commit (4a7417a):

Terminal *might* be too small 37:114
{0: 1, 1: 0, 2: 0}
addwstr() returned ERR
[<FrameSummary file /usr/bin/pulsemixer, line 1343 in run>, <FrameSummary file /usr/bin/pulsemixer, line 1693 in d
isplay>, <FrameSummary file /usr/bin/pulsemixer, line 1267 in display_line>]

I'm on Arch Linux 64-bit. I'm using the pulsemixer-git package from the AUR, but I've also cloned the github repo and tried it with that. I've tried in rxvt-unicode (urxvt) and xterm with the same results. In urxvt, I'm currently using the hack font, but I've also tried it with Adobe Source Code Pro. In xterm, it's using the default, ugly bitmap font.

I've also tried it with:
PULSEMIXER_BAR_STYLE="-----------" pulsemixer
but I get the same error.

Any other info I can provide or anything else I can try?

Try this https://gist.github.com/GeorgeFilipkin/2a1932af953527402f38a61ed21213cb

I should really implement a proper debug mode instead of torturing people with separate files

Looks like it works perfectly for me. I tried it in both urxvt and xterm and it seems to work for both. Thank you for getting this fixed (and for this project).

Pushed in.