spyder-ide/loghub

`None` issue number causing TypeError

djhoese opened this issue · 7 comments

When running (and any command really):

loghub pytroll/satpy -ilg bug enhancement --since-tag v0.8.0 -u davidh-ssec

it ends with:

Traceback (most recent call last):
  File "/Users/davidh/anaconda/envs/polar2grid_py36/bin/loghub", line 11, in <module>
    sys.exit(main())
  File "/Users/davidh/anaconda/envs/polar2grid_py36/lib/python3.6/site-packages/loghub/cli/main.py", line 29, in main
    parse_arguments(skip=False)
  File "/Users/davidh/anaconda/envs/polar2grid_py36/lib/python3.6/site-packages/loghub/cli/main.py", line 187, in parse_arguments
    show_prs=options.show_prs)
  File "/Users/davidh/anaconda/envs/polar2grid_py36/lib/python3.6/site-packages/loghub/core/formatter.py", line 257, in create_changelog
    filter_issues_fixed_by_prs(filtered_issues, filtered_prs)
  File "/Users/davidh/anaconda/envs/polar2grid_py36/lib/python3.6/site-packages/loghub/core/formatter.py", line 68, in filter_issues_fixed_by_prs
    issue_url = repo + issue_number
TypeError: must be str, not NoneType

Probably unrelated but I started getting this after having to switch to specifying my username since I hit the github query limit.

Is pytroll/satpy a public repo?

I confirmed this bug. We'll fix it in our next release.

Sounds good. Any idea what is causing it? Why would github return no number for an issue? Any idea when you might commit a fix (even if not released)? Thanks.

I think loghub is assuming (incorrectly) that each PR tries to fix a given issue, so it gives this error when it's unable to find an issue associated with a PR.

I'll try to come up with a fix in a couple of days because we also need it for Spyder.

I found the real problem: it happens because you have Closes #xxxx in some of your PRs and that's confusing loghub. The fix is quite simple.

New packages are available in PyPi, conda-forge ones will be ready soon.