Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git.TagReference.tag might be None, which causes AttributeError #180

Closed
Suor opened this issue Jun 21, 2022 · 2 comments · Fixed by #183
Closed

git.TagReference.tag might be None, which causes AttributeError #180

Suor opened this issue Jun 21, 2022 · 2 comments · Fixed by #183
Assignees
Labels
bug Something isn't working

Comments

@Suor
Copy link

Suor commented Jun 21, 2022

The stacktrace (read from bottom):

AttributeError: 'NoneType' object has no attribute 'tagged_date'
  File "celery/app/base.py", line 487, in run
    return task._orig_run(*args, **kwargs)
  File "funcy/decorators.py", line 45, in wrapper
    return deco(call, *dargs, **dkwargs)
  File "repos/exceptions.py", line 41, in wrap_provider_outage
    return call()
  File "funcy/decorators.py", line 66, in __call__
    return self._func(*self._args, **self._kwargs)
  File "contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "funcy/decorators.py", line 45, in wrapper
    return deco(call, *dargs, **dkwargs)
  File "viewer/logger.py", line 75, in deco
    return call()
  File "funcy/decorators.py", line 66, in __call__
    return self._func(*self._args, **self._kwargs)
  File "repos/tasks/repos.py", line 73, in parse_repo
    _parse_repo_or_slice(self, repo)
  File "repos/tasks/repos.py", line 106, in _parse_repo_or_slice
    raise e
  File "repos/tasks/repos.py", line 89, in _parse_repo_or_slice
    _parse_repo(self, repo)
  File "repos/tasks/repos.py", line 138, in _parse_repo
    parse_local_repo(repo, dirname)
  File "repos/parsing/__init__.py", line 49, in parse_local_repo
    _parse_repo(repo_obj, dirname, attrs, dvc=True)
  File "repos/parsing/__init__.py", line 153, in _parse_repo
    parse_gto(repo_obj, path, [], to_upd)
  File "contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "repos/parsing/gto.py", line 34, in parse_gto
    gto_information[tag] = check_ref(str(path), tag)
  File "gto/api.py", line 154, in check_ref
    result = reg.check_ref(ref)
  File "gto/registry.py", line 231, in check_ref
    "version": self.version_manager.check_ref(ref, self.get_state()),
  File "gto/registry.py", line 58, in get_state
    state = self.version_manager.update_state(state)
  File "gto/tag.py", line 265, in update_state
    tags = [parse_tag(t) for t in find(repo=self.repo, action=self.actions)]
  File "gto/tag.py", line 180, in find
    tags = sorted(tags, key=lambda t: t.tag.tagged_date)
  File "gto/tag.py", line 180, in <lambda>
    tags = sorted(tags, key=lambda t: t.tag.tagged_date)

Sentry issue

@aguschin
Copy link
Contributor

Thanks. This is due to those git tags being lightweight. GTO doesn't work with them since they don't contain a tagger, date, an annotation message and are intended for the local usage. So I'm filtering them out for now.

For the reference, see the discussion here #127

@aguschin aguschin added the bug Something isn't working label Jun 22, 2022
@aguschin aguschin moved this to Done in MLEM + GTO Jun 22, 2022
@aguschin aguschin self-assigned this Jun 22, 2022
@Suor
Copy link
Author

Suor commented Jun 23, 2022

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants