FS#63703 - [solfege] Starting solfege fails with AttributeError: 'NoneType' object has no attribute 'index'

Attached to Project: Community Packages
Opened by Christopher Arndt (SpotlightKid) - Monday, 09 September 2019, 13:55 GMT
Last edited by David Runge (dvzrv) - Monday, 18 November 2019, 20:12 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To David Runge (dvzrv)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Starting solfege fails with this Python exception:

Traceback (most recent call last):
File "/usr/bin/solfege", line 58, in <module>
import solfege.startup
File "/usr/share/solfege/solfege/startup.py", line 45, in <module>
from solfege.mainwin import MainWin, SplashWin
File "/usr/share/solfege/solfege/mainwin.py", line 28, in <module>
i = webbrowser._tryorder.index("x-www-browser")
AttributeError: 'NoneType' object has no attribute 'index'

Additional info:

Repositorium : community
Name : solfege
Version : 3.23.4-1

I would file a bug report upstream here https://savannah.gnu.org/bugs/?group=solfege, but it would require me to open another account, which I don't want and upstream doesn't seem to fix bugs in a timely manner anyway and the fix can easily applied during package building (see below).

Steps to reproduce:

Start 'solfege' from a terminal command line.

Analysis:

The 'mainwin.py' Python file tries to access the (non-public) module global '_tryorder' from the 'webbrowser' module as a list, before it is initialized by the 'register_standard_browsers' function, but then it is still 'None' and this has no 'index' attribute.

Suggested fix:

Insert the following line before line 28:

webbrowser.register_standard_browsers()
This task depends upon

Closed by  David Runge (dvzrv)
Monday, 18 November 2019, 20:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in solfege 3.23.4-2
Comment by loveJesus cowan, brian (loveJesus) - Saturday, 21 September 2019, 17:25 GMT
God be praised,
i can confirm that the bug exists on my system while running KDE and the proposed fix allows solfege to be launched,

thanks be to God for you and may God guide us and bless you in Jesus Holy name
Comment by David Runge (dvzrv) - Monday, 11 November 2019, 08:17 GMT
@SpotlightKid: Thanks for the report. A fix should land in the next pkgrel (already in [community-testing]). Sorry, that this took rather long, but we don't have active bug wrangling currently.

As a sidenote: I understand, that upstream is kinda undead in this case. However, I would prefer, if it wasn't always me reporting things to upstream... ;-)

Loading...