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

Traceback on gitlab plugin #159

Closed
angystardust opened this issue Nov 30, 2018 · 5 comments
Closed

Traceback on gitlab plugin #159

angystardust opened this issue Nov 30, 2018 · 5 comments
Assignees

Comments

@angystardust
Copy link

angystardust commented Nov 30, 2018

Hi, just installed 0.11 on a F29 via CORP repository and enable gitlab plugin:

> did  --gitlab  month
> Status report for November (2018-11-01 to 2018-11-30).
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  My User <myuser@example.com>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/lib/python2.7/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
>   InsecureRequestWarning)
> Traceback (most recent call last):
>   File "/usr/bin/did", line 42, in <module>
>     did.cli.main()
>   File "/usr/lib/python2.7/site-packages/did/cli.py", line 189, in main
>     user_stats.check()
>   File "/usr/lib/python2.7/site-packages/did/stats.py", line 136, in check
>     stat.check()
>   File "/usr/lib/python2.7/site-packages/did/stats.py", line 136, in check
>     stat.check()
>   File "/usr/lib/python2.7/site-packages/did/stats.py", line 79, in check
>     self.fetch()
>   File "/usr/lib/python2.7/site-packages/did/plugins/gitlab.py", line 208, in fetch
>     'Issue', 'opened')
>   File "/usr/lib/python2.7/site-packages/did/plugins/gitlab.py", line 138, in search
>     self.events = self.user_events(self.user['id'], since, until)
> TypeError: 'NoneType' object has no attribute '__getitem__'
> 

GitLab Community Edition 11.5.0

P.s.: thanks for your very useful software :)

@csams
Copy link
Contributor

csams commented Nov 30, 2018

Hey @angystardust, what's the gitlab section of your config look like? Do you have a login = set to your gitlab user id?

@angystardust
Copy link
Author

Yep, sorry for not pasting it in advance...

[gitlab]
type = gitlab
url = https://gitlab.example.com/
token = **************
login = myuser@example.com
ssl_verify = false

@csams
Copy link
Contributor

csams commented Nov 30, 2018

@angystardust No problem. I just started looking at this project myself last night.

I get a similar exception when using an email address but get results when using just myuser.

You can also set PYTHONWARNINGS="ignore:Unverified HTTPS request" to hide the ssl warnings:

PYTHONWARNINGS="ignore:Unverified HTTPS request" did this month --gitlab --brief

The error case still needs to be fixed, but maybe that'll work around it for now.

@angystardust
Copy link
Author

It works using just the username Thank @csams for your help!

@psss psss self-assigned this Dec 4, 2018
@psss
Copy link
Owner

psss commented Dec 4, 2018

Yes, we should definitely give a better error message in such situation.

@psss psss reopened this Dec 4, 2018
@psss psss closed this as completed in c3f3e33 Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants