Tutor v15 - Python Error when running on quickstart

Hello,

I was trying to be adventures and test out Tutor v15 however after upgrading with pip, and trying to run tutor local quickstart it immediately errors out with the following

Traceback (most recent call last):
  File "/usr/local/bin/tutor", line 5, in <module>
    from tutor.commands.cli import main
  File "/usr/local/lib/python3.8/dist-packages/tutor/commands/cli.py", line 7, in <module>
    from tutor import exceptions, fmt, hooks, utils
  File "/usr/local/lib/python3.8/dist-packages/tutor/hooks/__init__.py", line 7, in <module>
    from . import actions, contexts, filters, priorities
  File "/usr/local/lib/python3.8/dist-packages/tutor/hooks/actions.py", line 18, in <module>
    class ActionCallback(Contextualized, t.Generic[P]):
  File "/usr/lib/python3.8/typing.py", line 261, in inner
    return func(*args, **kwds)
  File "/usr/lib/python3.8/typing.py", line 890, in __class_getitem__
    raise TypeError(
TypeError: Parameters to Generic[...] must all be type variables

This is on Ubuntu 20.04LTS and Python 3.8.10, any ideas?

Thanks,
Tom

What’s your version of typing_extensions?

pip freeze | grep typing

EDIT: I managed to reproduce the issue with typing-extensions==3.10.0.0. I suggest you upgrade this package. I’ll also open a PR to upgrade the minimum required version.

EDIT: here is the PR: fix: "TypeError: Parameters to Generic[...]" error by regisb · Pull Request #758 · overhangio/tutor · GitHub

1 Like

Thanks! Yup, the version I had was 3.10.0.0