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

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(self) int[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]
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

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=1024, parent=None)[source]

Bases: QMessageBox

Specialized QMessageBox to provide information with attached exception

classmethod critical(parent=None, title='', text='', standard_buttons=1024, default_button=0, exception=None)[source]
Return type:

StandardButton

classmethod information(parent=None, title='', text='', standard_buttons=1024, default_button=0, exception=None)[source]
Return type:

StandardButton

classmethod question(parent=None, title='', text='', standard_buttons=1024, default_button=0, exception=None)[source]
Return type:

StandardButton

classmethod warning(parent=None, title='', text='', standard_buttons=1024, default_button=0, exception=None)[source]
Return type:

StandardButton

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

str