PartSeg.common_gui.error_report module

THis module contains widgets used for error reporting. The report backed is sentry.

class PartSeg.common_gui.error_report.DataImportErrorDialog(errors, parent=None, text='During import data part of the entries was filtered out')[source]

Bases: QDialog

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class PartSeg.common_gui.error_report.ErrorDialog(exception, description, additional_notes='', additional_info=None)[source]

Bases: QDialog

Dialog to present user the exception information. User can send error report (possible to add custom information)

create_issue()[source]

Create issue on github. This method is used when user disable error reporting.

exec()[source]
exec_()[source]

Check if dialog should be shown base on state_store.show_error_dialog. If yes then show dialog. Otherwise print exception traceback on stderr.

send_report()[source]

Function with construct final error message and send it using sentry.

setup_ui()[source]
staticMetaObject = <PySide2.QtCore.QMetaObject object>
class PartSeg.common_gui.error_report.ExceptionList(parent=None)[source]

Bases: QListWidget

List to store exceptions

static item_double_clicked(el)[source]

if element clicked is ExceptionListItem then open ErrorDialog for reporting this error.

This function is connected to itemDoubleClicked

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class PartSeg.common_gui.error_report.ExceptionListItem(exception, parent=None)[source]

Bases: QListWidgetItem

Element storing exception and showing basic information about it

Parameters:

exception (Union[Exception, Tuple[Exception, List]]) – exception or union of exception and traceback

class PartSeg.common_gui.error_report.QMessageFromException(icon, title, text, exception, standard_buttons=PySide2.QtWidgets.QMessageBox.StandardButton.Ok, parent=None)[source]

Bases: QMessageBox

Specialized QMessageBox to provide information with attached exception

classmethod critical(parent=None, title='', text='', standard_buttons=PySide2.QtWidgets.QMessageBox.StandardButton.Ok, default_button=PySide2.QtWidgets.QMessageBox.StandardButton.NoButton, exception=None)[source]
classmethod critical(parent: QWidget, title: str, text: str, buttons: StandardButtons = PySide2.QtWidgets.QMessageBox.StandardButton.Ok, defaultButton: StandardButton = PySide2.QtWidgets.QMessageBox.StandardButton.NoButton) StandardButton
Return type:

StandardButton

classmethod information(parent=None, title='', text='', standard_buttons=PySide2.QtWidgets.QMessageBox.StandardButton.Ok, default_button=PySide2.QtWidgets.QMessageBox.StandardButton.NoButton, exception=None)[source]
classmethod information(parent: QWidget, title: str, text: str, buttons: StandardButtons = PySide2.QtWidgets.QMessageBox.StandardButton.Ok, defaultButton: StandardButton = PySide2.QtWidgets.QMessageBox.StandardButton.NoButton) StandardButton
Return type:

StandardButton

classmethod question(parent=None, title='', text='', standard_buttons=PySide2.QtWidgets.QMessageBox.StandardButton.Ok, default_button=PySide2.QtWidgets.QMessageBox.StandardButton.NoButton, exception=None)[source]
classmethod question(parent: QWidget, title: str, text: str, buttons: StandardButtons = Instance(QMessageBox.StandardButtons(QMessageBox.Yes | QMessageBox.No)), defaultButton: StandardButton = PySide2.QtWidgets.QMessageBox.StandardButton.NoButton) StandardButton
Return type:

StandardButton

staticMetaObject = <PySide2.QtCore.QMetaObject object>
classmethod warning(parent=None, title='', text='', standard_buttons=PySide2.QtWidgets.QMessageBox.StandardButton.Ok, default_button=PySide2.QtWidgets.QMessageBox.StandardButton.NoButton, exception=None)[source]
classmethod warning(parent: QWidget, title: str, text: str, buttons: StandardButtons = PySide2.QtWidgets.QMessageBox.StandardButton.Ok, defaultButton: StandardButton = PySide2.QtWidgets.QMessageBox.StandardButton.NoButton) StandardButton
Return type:

StandardButton

PartSeg.common_gui.error_report.get_user()[source]
Return type:

str