openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #24453
[Bug 1385979] [NEW] Settings form -- list_item variable issue
Public bug reported:
Traceback (most recent call last):
File "~/Projects/openlp/openlp/core/ui/settingsform.py", line 151, in list_item_changed
if tab_widget.tab_title == list_item.data(QtCore.Qt.UserRole):
AttributeError: 'NoneType' object has no attribute 'data'
This is an easy fix.
In file settingsform.py find: def list_item_changed(self, item_index)
Then Replace:
# Get the item we clicked on
list_item = self.setting_list_widget.item(item_index)
With:
# Get the item we clicked on
list_item = self.setting_list_widget.item(item_index)
# Check if item exits
if not list_item:
return
** Affects: openlp
Importance: Undecided
Status: New
** Description changed:
Traceback (most recent call last):
- File "~/Projects/openlp/openlp/core/ui/settingsform.py", line 151, in list_item_changed
- if tab_widget.tab_title == list_item.data(QtCore.Qt.UserRole):
+ File "~/Projects/openlp/openlp/core/ui/settingsform.py", line 151, in list_item_changed
+ if tab_widget.tab_title == list_item.data(QtCore.Qt.UserRole):
AttributeError: 'NoneType' object has no attribute 'data'
This is an easy fix.
- Replace:
- # Get the item we clicked on
- list_item = self.setting_list_widget.item(item_index)
+ In file settingsform.py find: def list_item_changed(self, item_index)
+
+ Then Replace:
+ # Get the item we clicked on
+ list_item = self.setting_list_widget.item(item_index)
With:
- # Get the item we clicked on
- list_item = self.setting_list_widget.item(item_index)
- # Check if item exits
- if not list_item:
- return
+ # Get the item we clicked on
+ list_item = self.setting_list_widget.item(item_index)
+ # Check if item exits
+ if not list_item:
+ return
** Summary changed:
- Settings form need to validate variable list_item in list_item_changed
+ Settings form -- list_item variable issue
--
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1385979
Title:
Settings form -- list_item variable issue
Status in OpenLP - Worship Presentation Software:
New
Bug description:
Traceback (most recent call last):
File "~/Projects/openlp/openlp/core/ui/settingsform.py", line 151, in list_item_changed
if tab_widget.tab_title == list_item.data(QtCore.Qt.UserRole):
AttributeError: 'NoneType' object has no attribute 'data'
This is an easy fix.
In file settingsform.py find: def list_item_changed(self, item_index)
Then Replace:
# Get the item we clicked on
list_item = self.setting_list_widget.item(item_index)
With:
# Get the item we clicked on
list_item = self.setting_list_widget.item(item_index)
# Check if item exits
if not list_item:
return
To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1385979/+subscriptions
Follow ups
References