Trouble with upgrading from 9.1.2 to 10.0.0

Hello! I’ve got an old installation of sentry, version 9.1.2 - python mode, no containers. I’m trying to upgrade it. First step was 9.1.2 → 10.0.0 and I’m stuck. After pip install sentry==10.0.0 I’m trying to run upgrade:

$ sentry upgrade
08:18:49 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
Failed to load plugin 'mattermost':
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sentry/runner/", line 25, in register_plugins
    plugin = ep.load()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/", line 2443, in load
    return self.resolve()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python2.7/dist-packages/sentry_mattermost/", line 29, in <module>
    from sentry.models import TagKey, TagValue
ImportError: cannot import name TagKey

08:18:53 [INFO] sentry.plugins.github: apps-not-configured
Traceback (most recent call last):
  File "/usr/local/bin/sentry", line 8, in <module>
  File "/usr/local/lib/python2.7/dist-packages/sentry/runner/", line 164, in main
    cli(prog_name=get_prog(), obj={}, max_content_width=100)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sentry/runner/", line 29, in inner
  File "/usr/local/lib/python2.7/dist-packages/sentry/runner/", line 127, in configure
    configure(ctx, py, yaml, skip_service_validation)
  File "/usr/local/lib/python2.7/dist-packages/sentry/runner/", line 153, in configure
  File "/usr/local/lib/python2.7/dist-packages/sentry/runner/", line 322, in initialize_app
  File "/usr/local/lib/python2.7/dist-packages/sentry/utils/", line 125, in configure_sdk
  File "/usr/local/lib/python2.7/dist-packages/sentry_sdk/", line 105, in _init
    client = Client(*args, **kwargs)  # type: ignore
  File "/usr/local/lib/python2.7/dist-packages/sentry_sdk/", line 87, in __init__
    self.options = get_options(*args, **kwargs)  # type: Dict[str, Any]
  File "/usr/local/lib/python2.7/dist-packages/sentry_sdk/", line 60, in _get_options
    raise TypeError("Unknown option %r" % (key,))
TypeError: Unknown option 'traceparent_v2'

$ pip list|grep sentry
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at pip 21.0 will remove support for this functionality.
sentry                        10.0.0
sentry-mattermost             0.0.1
sentry-sdk                    0.19.5

Could you please help me with that?

We don’t support custom installations like this. Looks like there are two issues:

  1. sentry-mattermost plugin needs updating
  2. Your sentry-sdk version is incompatible with Sentry v10.

Btw you can jump directly to 21.1.0 from 9.1.2. We even encourage this as newer versions have a bunch of fixes regarding upgrades from 9.1.2.