Object is not subscriptable

Hello,

Just in! I was getting one too, likely introduced with a recent routine update ( > 10 hours ago) upgrading to snapcraft, version 6.0.

Sometimes I experience occasional problems that just need a retry, but this one stuck. Started to try attentively up/downgrading, a

snapcraft refresh

seems to have sorted it. Not sure it’s the same thing, for the record, the call stack here was as below.

Best,

Janos


Traceback (most recent call last):
  File "/snap/snapcraft/6954/bin/snapcraft", line 8, in <module>
    sys.exit(run())
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/click/core.py", line 1646, in invoke
    super().invoke(ctx)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/snapcraft/cli/_runner.py", line 130, in run
    snap_command.invoke(ctx)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/snapcraft/cli/lifecycle.py", line 387, in snap
    _execute(steps.PRIME, parts=tuple(), pack_project=True, output=output, **kwargs)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/snapcraft/cli/lifecycle.py", line 102, in _execute
    lifecycle.execute(step, project_config, parts)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 122, in execute
    installed_snaps = _install_build_snaps(
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 83, in _install_build_snaps
    installed_snaps = repo.snaps.install_snaps(build_snaps)
  File "/snap/snapcraft/6954/lib/python3.8/site-packages/snapcraft/internal/repo/snaps.py", line 295, in install_snaps
    snap_pkg_channel = snap_info["channel"]
TypeError: 'NoneType' object is not subscriptable

(Sent it in as well a few times.)