Automated bug/error reporting for napari

Overview

napari-error-monitor

License PyPI Python Version CI codecov

Want to help out napari? Install this plugin!

This plugin will automatically send error reports to napari (via sentry.io) whenever an exception occurs while you are using napari.

The first time you run napari after installing this plugin an opt-in notification will appear (Be sure to click "yes", otherwise no reports will be collected or sent). You may opt back out at any time in napari's help menu.

Every effort is made to strip these reports of personally identifiable information. Here is an example exception event:

Example bug report
{
    'breadcrumbs': {
        'values': [
            {
                'category': 'subprocess',
                'data': {},
                'message': 'sw_vers -productVersion',
                'timestamp': '2022-02-02T01:30:00.216738Z',
                'type': 'subprocess'
            }
        ]
    },
    'contexts': {
        'runtime': {
            'build': '3.9.9 | packaged by conda-forge | (main, Dec 20 2021, 02:41:37) \n[Clang 11.1.0 ]',
            'name': 'CPython',
            'version': '3.9.9'
        }
    },
    'environment': 'macOS-10.15.7-x86_64-i386-64bit',
    'event_id': '02dd8ddd3a4b4743af3d7d7a09949df4',
    'exception': {
        'values': [
            {
                'mechanism': None,
                'module': None,
                'stacktrace': {
                    'frames': [
                        {
                            'context_line': '                x = 1 / 0',
                            'filename': 'napari_error_monitor/_util.py',
                            'function': 'get_sample_event',
                            'in_app': True,
                            'lineno': 130,
                            'module': 'napari_error_monitor._util',
                            'post_context': [
                                '            except Exception:',
                                '                with sentry_sdk.push_scope() as scope:',
                                '                    for k, v in _get_tags().items():',
                                '                        scope.set_tag(k, v)',
                                '                    del v, k, scope'
                            ],
                            'pre_context': [
                                "            # remove locals that wouldn't really be there",
                                '            del settings, _trans, kwargs, client, EVENT',
                                '            try:',
                                '                some_variable = 1',
                                '                another_variable = "my_string"'
                            ]
                        }
                    ]
                },
                'type': 'ZeroDivisionError',
                'value': 'division by zero'
            }
        ]
    },
    'extra': {'sys.argv': ['napari']},
    'level': 'error',
    'modules': {
        'aicsimageio': '4.5.2',
        'aicspylibczi': '3.0.4',
        'aiohttp': '3.8.1',
        'aiosignal': '1.2.0',
        'alabaster': '0.7.12',
        'anyio': '3.5.0',
        'appdirs': '1.4.4',
        'appnope': '0.1.2',
        'argon2-cffi': '21.3.0',
        'argon2-cffi-bindings': '21.2.0',
        'arrow': '1.2.1',
        'asciitree': '0.3.3',
        'asttokens': '2.0.5',
        'async-timeout': '4.0.2',
        'atomium': '1.0.11',
        'attrs': '21.4.0',
        'autopep8': '1.6.0',
        'babel': '2.9.1',
        'backcall': '0.2.0',
        'bcrypt': '3.2.0',
        'beautifulsoup4': '4.10.0',
        'binaryornot': '0.4.4',
        'black': '20.8b1',
        'bleach': '4.1.0',
        'bracex': '2.2.1',
        'build': '0.7.0',
        'cachey': '0.2.1',
        'cellpose': '0.6.5',
        'certifi': '2021.10.8',
        'cffi': '1.15.0',
        'cfgv': '3.3.1',
        'chardet': '4.0.0',
        'charset-normalizer': '2.0.10',
        'check-manifest': '0.47',
        'click': '7.1.2',
        'click-option-group': '0.5.3',
        'cloudpickle': '2.0.0',
        'colorama': '0.4.4',
        'commonmark': '0.9.1',
        'cookiecutter': '1.7.3',
        'coverage': '6.2',
        'cryptography': '36.0.1',
        'cycler': '0.11.0',
        'dask': '2022.1.0',
        'debugpy': '1.5.1',
        'decorator': '5.1.1',
        'defusedxml': '0.7.1',
        'distlib': '0.3.4',
        'dnspython': '2.2.0',
        'docstring-parser': '0.13',
        'docutils': '0.16',
        'elementpath': '2.4.0',
        'email-validator': '1.1.3',
        'entrypoints': '0.3',
        'executing': '0.8.2',
        'fancycompleter': '0.9.1',
        'fasteners': '0.17.2',
        'fastremap': '1.12.2',
        'filelock': '3.4.2',
        'flake8': '3.8.4',
        'fonttools': '4.28.5',
        'freetype-py': '2.2.0',
        'frozenlist': '1.3.0',
        'fsspec': '2022.1.0',
        'furo': '2022.1.2',
        'gitdb': '4.0.9',
        'gitpython': '3.1.26',
        'greenlet': '1.1.2',
        'heapdict': '1.0.1',
        'hsluv': '5.0.2',
        'hypothesis': '6.35.1',
        'identify': '2.4.4',
        'idna': '3.3',
        'imagecodecs': '2021.11.20',
        'imageio': '2.10.5',
        'imageio-ffmpeg': '0.4.5',
        'imagesize': '1.3.0',
        'importlib-metadata': '4.10.1',
        'iniconfig': '1.1.1',
        'install': '1.3.5',
        'intervaltree': '3.1.0',
        'ipykernel': '6.7.0',
        'ipython': '8.0.0',
        'ipython-genutils': '0.2.0',
        'ipywidgets': '7.6.5',
        'jedi': '0.18.1',
        'jinja2': '3.0.3',
        'jinja2-time': '0.2.0',
        'jsonschema': '3.2.0',
        'jupyter': '1.0.0',
        'jupyter-book': '0.12.1',
        'jupyter-cache': '0.4.3',
        'jupyter-client': '7.1.1',
        'jupyter-console': '6.4.0',
        'jupyter-core': '4.9.1',
        'jupyter-server': '1.13.3',
        'jupyter-server-mathjax': '0.2.3',
        'jupyter-sphinx': '0.3.2',
        'jupyterlab-pygments': '0.1.2',
        'jupyterlab-widgets': '1.0.2',
        'jupytext': '1.11.5',
        'kiwisolver': '1.3.2',
        'latexcodec': '2.0.1',
        'linkify-it-py': '1.0.3',
        'llvmlite': '0.38.0',
        'locket': '0.2.1',
        'loguru': '0.5.3',
        'lxml': '4.7.1',
        'magicgui': '0.3.5.dev18+g78d1687',
        'markdown-it-py': '1.1.0',
        'markupsafe': '2.0.1',
        'matplotlib': '3.5.1',
        'matplotlib-inline': '0.1.3',
        'mccabe': '0.6.1',
        'mdit-py-plugins': '0.2.8',
        'meshzoo': '0.9.2',
        'mistune': '0.8.4',
        'mrc': '0.2.0',
        'msgpack': '1.0.3',
        'multidict': '5.2.0',
        'mypy': '0.931',
        'mypy-extensions': '0.4.3',
        'myst-nb': '0.13.1',
        'myst-parser': '0.15.2',
        'napari': '0.4.14rc1.dev4+gcdf58d44b',
        'napari-aicsimageio': '0.4.1',
        'napari-console': '0.0.4',
        'napari-dv': '0.2.7.dev0+g54e1691.d20220128',
        'napari-error-monitor': '0.1.dev1+g1b388f2.d20220201',
        'napari-hello': '0.0.1',
        'napari-math': '0.0.1a0',
        'napari-micromanager': '0.0.1rc6.dev14+g5149788.d20220128',
        'napari-molecule-reader': '0.1.2.dev1+gc2ec2de',
        'napari-plugin-engine': '0.2.0',
        'napari-pyclesperanto-assistant': '0.12.0',
        'napari-skimage-regionprops': '0.2.9',
        'napari-svg': '0.1.6',
        'napari-time-slicer': '0.4.2',
        'napari-workflows': '0.1.2',
        'natsort': '8.0.2',
        'nbclient': '0.5.10',
        'nbconvert': '6.4.0',
        'nbdime': '3.1.1',
        'nbformat': '5.1.3',
        'nd2': '0.1.4',
        'nest-asyncio': '1.5.4',
        'networkx': '2.6.3',
        'nodeenv': '1.6.0',
        'notebook': '6.4.7',
        'npe2': '0.1.1',
        'numba': '0.55.0',
        'numcodecs': '0.9.1',
        'numpy': '1.20.3',
        'numpydoc': '1.1.0',
        'ome-types': '0.2.10',
        'opencv-python-headless': '4.5.5.62',
        'packaging': '21.3',
        'pandas': '1.3.5',
        'pandocfilters': '1.5.0',
        'paramiko': '2.9.2',
        'parso': '0.8.3',
        'partd': '1.2.0',
        'pathspec': '0.9.0',
        'pdbpp': '0.10.3',
        'peewee': '3.14.8',
        'pep517': '0.12.0',
        'pexpect': '4.8.0',
        'pickleshare': '0.7.5',
        'pillow': '8.4.0',
        'pint': '0.18',
        'pip': '21.3.1',
        'platformdirs': '2.4.1',
        'pluggy': '1.0.0',
        'pooch': '1.5.2',
        'poyo': '0.5.0',
        'pre-commit': '2.16.0',
        'prometheus-client': '0.12.0',
        'prompt-toolkit': '3.0.24',
        'psutil': '5.9.0',
        'psygnal': '0.2.0',
        'ptyprocess': '0.7.0',
        'pure-eval': '0.2.1',
        'py': '1.11.0',
        'pybtex': '0.24.0',
        'pybtex-docutils': '1.0.1',
        'pyclesperanto-prototype': '0.12.0',
        'pycodestyle': '2.8.0',
        'pycparser': '2.21',
        'pydantic': '1.9.0',
        'pydata-sphinx-theme': '0.7.2',
        'pyflakes': '2.2.0',
        'pygments': '2.11.2',
        'pymmcore': '10.1.1.70.5',
        'pymmcore-plus': '0.1.8',
        'pynacl': '1.5.0',
        'pyopencl': '2021.2.13',
        'pyopengl': '3.1.5',
        'pyparsing': '3.0.6',
        'pyperclip': '1.8.2',
        'pyrepl': '0.9.0',
        'pyro5': '5.13.1',
        'pyrsistent': '0.18.1',
        'pyside2': '5.15.2.1',
        'pytest': '6.2.5',
        'pytest-cookies': '0.6.1',
        'pytest-cov': '3.0.0',
        'pytest-faulthandler': '2.0.1',
        'pytest-order': '1.0.1',
        'pytest-qt': '4.0.2',
        'python-dateutil': '2.8.2',
        'python-dotenv': '0.19.2',
        'python-slugify': '5.0.2',
        'pytomlpp': '1.0.10',
        'pytools': '2021.2.9',
        'pytz': '2021.3',
        'pywavelets': '1.2.0',
        'pyyaml': '6.0',
        'pyzmq': '22.3.0',
        'qtconsole': '5.2.2',
        'qtpy': '2.0.0',
        'regex': '2021.11.10',
        'requests': '2.27.1',
        'rich': '11.0.0',
        'rmsd': '1.4',
        'ruamel.yaml': '0.17.20',
        'ruamel.yaml.clib': '0.2.6',
        'scikit-image': '0.19.1',
        'scipy': '1.7.3',
        'semgrep': '0.78.0',
        'send2trash': '1.8.0',
        'sentry-sdk': '1.5.4',
        'serpent': '1.40',
        'setuptools': '60.5.0',
        'shiboken2': '5.15.2.1',
        'six': '1.16.0',
        'smmap': '5.0.0',
        'sniffio': '1.2.0',
        'snowballstemmer': '2.2.0',
        'sortedcontainers': '2.4.0',
        'soupsieve': '2.3.1',
        'sourcery-cli': '0.10.0',
        'sphinx': '4.4.0',
        'sphinx-autodoc-typehints': '1.12.0',
        'sphinx-book-theme': '0.1.10',
        'sphinx-comments': '0.0.3',
        'sphinx-copybutton': '0.4.0',
        'sphinx-external-toc': '0.2.3',
        'sphinx-jupyterbook-latex': '0.4.6',
        'sphinx-multitoc-numbering': '0.1.3',
        'sphinx-panels': '0.6.0',
        'sphinx-tabs': '3.2.0',
        'sphinx-thebe': '0.0.10',
        'sphinx-togglebutton': '0.2.3',
        'sphinxcontrib-applehelp': '1.0.2',
        'sphinxcontrib-bibtex': '2.2.1',
        'sphinxcontrib-devhelp': '1.0.2',
        'sphinxcontrib-htmlhelp': '2.0.0',
        'sphinxcontrib-jsmath': '1.0.1',
        'sphinxcontrib-qthelp': '1.0.3',
        'sphinxcontrib-serializinghtml': '1.1.5',
        'sqlalchemy': '1.4.29',
        'stack-data': '0.1.4',
        'superqt': '0.2.5.post2.dev7+ga49bcd7',
        'tensorstore': '0.1.16',
        'terminado': '0.12.1',
        'testpath': '0.5.0',
        'text-unidecode': '1.3',
        'tifffile': '2021.11.2',
        'toml': '0.10.2',
        'tomli': '2.0.0',
        'toolz': '0.11.2',
        'torch': '1.10.1',
        'tornado': '6.1',
        'tox': '3.24.5',
        'tox-conda': '0.9.1',
        'tqdm': '4.62.3',
        'traitlets': '5.1.1',
        'transforms3d': '0.3.1',
        'transitions': '0.8.10',
        'typed-ast': '1.5.1',
        'typer': '0.4.0',
        'typing-extensions': '4.0.1',
        'uc-micro-py': '1.0.1',
        'urllib3': '1.26.8',
        'useq-schema': '0.1.1.dev13+g01d1b46.d20220120',
        'valerius': '0.2.0',
        'virtualenv': '20.13.0',
        'vispy': '0.9.4',
        'watchdog': '2.1.6',
        'wcmatch': '8.3',
        'wcwidth': '0.2.5',
        'webencodings': '0.5.1',
        'websocket-client': '1.2.3',
        'wheel': '0.37.1',
        'widgetsnbextension': '3.5.2',
        'wmctrl': '0.4',
        'wrapt': '1.13.3',
        'wurlitzer': '3.0.2',
        'xarray': '0.20.2',
        'xmlschema': '1.9.2',
        'yarl': '1.7.2',
        'zarr': '2.10.3',
        'zipp': '3.7.0'
    },
    'platform': 'python',
    'release': '0.4.14rc1.dev4+gcdf58d44b',
    'sdk': {
        'integrations': [
            'aiohttp',
            'argv',
            'atexit',
            'dedupe',
            'excepthook',
            'logging',
            'modules',
            'sqlalchemy',
            'stdlib',
            'threading',
            'tornado'
        ],
        'name': 'sentry.python',
        'packages': [{'name': 'pypi:sentry-sdk', 'version': '1.5.4'}],
        'version': '1.5.4'
    },
    'server_name': '',
    'tags': {
        'platform.name': 'MacOS 10.15.7',
        'platform.system': 'Darwin',
        'qtpy.API_NAME': 'PySide2',
        'qtpy.QT_VERSION': '5.15.2'
    },
    'timestamp': '2022-02-02T01:30:00.229122Z'
}

note: in the opt-in dialog, there is a checkbox labeled "include local variables", checking this will include the value of variables in the local scope when an exception occurs. While these can be very useful when interpreting a bug report, they may occasionally include local file path strings. If that concerns you, please leave this box unchecked

Install

pip install napari-error-monitor

Thank you!!

Owner
Talley Lambert
Microscopist at Harvard Medical School
Talley Lambert
Monitor Memory usage of Python code

Memory Profiler This is a python module for monitoring memory consumption of a process as well as line-by-line analysis of memory consumption for pyth

Fabian Pedregosa 80 Nov 18, 2022
Full-screen console debugger for Python

PuDB: a console-based visual debugger for Python Its goal is to provide all the niceties of modern GUI-based debuggers in a more lightweight and keybo

Andreas Klöckner 2.6k Jan 01, 2023
Hdbg - Historical Debugger

hdbg - Historical Debugger This is in no way a finished product. Do not use this

Fivreld 2 Jan 02, 2022
A powerful set of Python debugging tools, based on PySnooper

snoop snoop is a powerful set of Python debugging tools. It's primarily meant to be a more featureful and refined version of PySnooper. It also includ

Alex Hall 874 Jan 08, 2023
Pyinstrument - a Python profiler. A profiler is a tool to help you optimize your code - make it faster.

Pyinstrument🚴 Call stack profiler for Python. Shows you why your code is slow!

Joe Rickerby 5k Jan 08, 2023
EDB 以太坊单合约交易调试工具

EDB 以太坊单合约交易调试工具 Idea 在刷题的时候遇到一类JOP(Jump-Oriented-Programming)的题目,fuzz或者调试这类题目缺少简单易用的工具,由此开发了一个简单的调试工具EDB(The Ethereum Debugger),利用debug_traceTransact

16 May 21, 2022
Sane color handling of osx's accent and highlight color from the commandline

osx-colors Sane command line color customisation for osx, no more fiddling about with defaults, internal apple color constants and rgb color codes Say

Clint Plummer 8 Nov 17, 2022
Trashdbg - TrashDBG the world's worse debugger

The world's worse debugger Over the course of multiple OALABS Twitch streams we

OALabs 21 Jun 17, 2022
An x86 old-debug-like program.

An x86 old-debug-like program.

Pablo Niklas 1 Jan 10, 2022
VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.

VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.

2.8k Jan 08, 2023
Django package to log request values such as device, IP address, user CPU time, system CPU time, No of queries, SQL time, no of cache calls, missing, setting data cache calls for a particular URL with a basic UI.

django-web-profiler's documentation: Introduction: django-web-profiler is a django profiling tool which logs, stores debug toolbar statistics and also

MicroPyramid 77 Oct 29, 2022
A gdb-like Python3 Debugger in the Trepan family

Abstract Features More Exact location information Debugging Python bytecode (no source available) Source-code Syntax Colorization Command Completion T

R. Bernstein 126 Nov 24, 2022
GDB plugin for streaming defmt messages over RTT from e.g. JLinkGDBServer

Defmt RTT plugin from GDB This small plugin runs defmt-print on the RTT stream produced by JLinkGDBServer, so that you can see the defmt logs in the G

Gaute Hope 1 Dec 30, 2021
🍦 Never use print() to debug again.

IceCream -- Never use print() to debug again Do you ever use print() or log() to debug your code? Of course you do. IceCream, or ic for short, makes p

Ansgar Grunseid 6.5k Jan 07, 2023
A toolbar overlay for debugging Flask applications

Flask Debug-toolbar This is a port of the excellent django-debug-toolbar for Flask applications. Installation Installing is simple with pip: $ pip ins

863 Dec 29, 2022
Sentry is cross-platform application monitoring, with a focus on error reporting.

Users and logs provide clues. Sentry provides answers. What's Sentry? Sentry is a service that helps you monitor and fix crashes in realtime. The serv

Sentry 32.9k Dec 31, 2022
🔥 Pyflame: A Ptracing Profiler For Python. This project is deprecated and not maintained.

Pyflame: A Ptracing Profiler For Python (This project is deprecated and not maintained.) Pyflame is a high performance profiling tool that generates f

Uber Archive 3k Jan 07, 2023
AryaBota: An app to teach Python coding via gradual programming and visual output

AryaBota An app to teach Python coding, that gradually allows students to transition from using commands similar to natural language, to more Pythonic

5 Feb 08, 2022
A simple rubber duck debugger

Rubber Duck Debugger I found myself many times asking a question on StackOverflow or to one of my colleagues just for finding the solution simply by d

1 Nov 10, 2021
Run-time type checker for Python

This library provides run-time type checking for functions defined with PEP 484 argument (and return) type annotations. Four principal ways to do type

Alex Grönholm 1.1k Jan 05, 2023