" + data["description"] + "
" - except KeyError: - pass + item_info += generate_item_info(data) item_info += "" self.ui.desc.setText(item_info) diff --git a/starcheat/gui/mainwindow.py b/starcheat/gui/mainwindow.py index c263d87..d6027a9 100644 --- a/starcheat/gui/mainwindow.py +++ b/starcheat/gui/mainwindow.py @@ -450,8 +450,15 @@ def update_bag(self, bag_name): column = 0 def update_player_preview(self): - image = self.assets.species().render_player(self.player) - pixmap = QPixmap.fromImage(ImageQt(image)).scaled(86, 86) + try: + image = self.assets.species().render_player(self.player) + pixmap = QPixmap.fromImage(ImageQt(image)).scaled(86, 86) + except (OSError, TypeError, AttributeError): + # TODO: more specific error handling. may as well except all errors + # at this point jeez + logging.exception("Couldn't load species images") + pixmap = QPixmap() + self.ui.player_preview.setPixmap(pixmap) self.window.setWindowModified(True) diff --git a/starcheat/templates/ItemBrowser.ui b/starcheat/templates/ItemBrowser.ui index 702492d..4d32b2e 100644 --- a/starcheat/templates/ItemBrowser.ui +++ b/starcheat/templates/ItemBrowser.ui @@ -6,8 +6,8 @@