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

Errors with some repositories (Datadog, Grafana) #2

Closed
mNantern opened this issue Jun 12, 2019 · 6 comments
Closed

Errors with some repositories (Datadog, Grafana) #2

mNantern opened this issue Jun 12, 2019 · 6 comments

Comments

@mNantern
Copy link

Thank you for this useful project, it works very well !

Except for 2 repositories:

  • Grafana : the latest version is 6.2.2 and lastversion outputs 5.4.4
  • Datadog-agent : lastversion fails with an error:
Traceback (most recent call last):
  File "/usr/local/bin/lastversion", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/lastversion/lastversion.py", line 95, in main
    version = latest(args.repo, args.sniff, args.validate)
  File "/usr/local/lib/python2.7/site-packages/lastversion/lastversion.py", line 41, in latest
    the_version = release.find("a").text
AttributeError: 'NoneType' object has no attribute 'text'
dvershinin added a commit that referenced this issue Jun 12, 2019
In case collapsed "tag only" releases go first, we should ignore until something valid is found
@dvershinin
Copy link
Owner

Thanks for the bug report. Fixed and released 0.0.9 with tests and fixes.

@mNantern
Copy link
Author

That's great, thank you ! But in the process it looks like you broke something.

For example now the repository roer is failing :

Traceback (most recent call last):
  File "/usr/local/bin/lastversion", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/lastversion/lastversion.py", line 153, in main
    version = latest(args.repo, args.sniff, args.validate, args.format)
  File "/usr/local/lib/python3.7/site-packages/lastversion/lastversion.py", line 100, in latest
    description = r.find(class_='markdown-body').text
AttributeError: 'NoneType' object has no attribute 'text'

It was working in version 0.0.8.

@dvershinin
Copy link
Owner

Some update with new options (--format json) caused it. The 0.0.10 (just released) should fix that.
Added test for that repo as well.

Thanks.

@mNantern
Copy link
Author

Unfortunately I think something went wrong with the release. I now always have the following error with v0.0.10:

Traceback (most recent call last):
  File "/usr/local/bin/lastversion", line 6, in <module>
    from lastversion import main
  File "/usr/local/lib/python3.7/site-packages/lastversion/__init__.py", line 9, in <module>
    from .lastversion import main
  File "/usr/local/lib/python3.7/site-packages/lastversion/lastversion.py", line 16, in <module>
    from __about__ import __version__
ModuleNotFoundError: No module named '__about__'

@dvershinin
Copy link
Owner

dvershinin commented Jun 13, 2019

I've been testing with Python 2.7 mainly. Now with 3.6 confirmed the issue and the fix was very simple.
Released 0.0.11 and now testing Python 3.7 as well. Thanks :)

@mNantern
Copy link
Author

Everything is working great now, thank you 👍

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