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

AssertionError: an attachment must be followed by a comment #2

Open
dimpase opened this issue Sep 8, 2022 · 2 comments
Open

AssertionError: an attachment must be followed by a comment #2

dimpase opened this issue Sep 8, 2022 · 2 comments

Comments

@dimpase
Copy link
Contributor

dimpase commented Sep 8, 2022

On https://trac.sagemath.org/ticket/7 one gets

Migrate ticket #7 (5 changes): very strange bug with LaurentS
  created issue Issue(title="very strange bug with LaurentSeriesRing", number=28)
  comment by was ( -> )
  attachment by was ( -> 1790.patch)
  resolution by was ( -> fixed)
Traceback (most recent call last):
  File "./migrate.py", line 806, in <module>
    convert_issues(source, dest, only_issues = only_issues, blacklist_issues = blacklist_issues)
  File "./migrate.py", line 568, in convert_issues
    assert attachment is None or change_type == "comment", "an attachment must be followed by a comment"
AssertionError: an attachment must be followed by a comment

Is it because the attachment was added after the last comment? Or something else?

@dimpase
Copy link
Contributor Author

dimpase commented Sep 8, 2022

yes, adding one more comment to the ticket in question allows the attachment to be imported. So this appears to be an easy logic adjustment to do.

@svigerske
Copy link
Owner

OK. I don't remember anything. Might be that this logic is even from the trac-to-gitlab that was the base of this, which was taken from somewhere else again...

The scripts will need adjustments for your usecase. If you have a fix for this issue or other general improvements, then I can merge them into here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants