You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ProjectPipelineJob seems to be broken in 1.5.0 #537
Description of the problem, including code/CLI snippet
pipeline = proj.pipelines.list()[0]
for job in pipeline.jobs.list(): print(job.attributes)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-32-527712123652> in <module>()
----> 1 for job in pipeline.jobs.list(): print(job.attributes)
AttributeError: 'ProjectPipelineJob' object has no attribute 'attributes'
Expected Behavior
To get the attributes of the pipeline job. This is the behavior in 1.4.0.
Actual Behavior
--> AttributeError
In fact, none of the expected class instance members are there.
Specifications
python-gitlab version: 1.5.0
API version you are using (v3/v4): v4
Gitlab server version (or gitlab.com): 10.8.3 (564c342)
I'm still seeing this w/ python-gitlab (1.5.1) (from pypi). I double-checked, I have the change referenced in 4cf8118
Maybe related... Its a group project:
(Pdb) p project
(Pdb) p project.pipelines
*** AttributeError: pipelines
File "/usr/local/lib/python3.6/dist-packages/gitlab/base.py", line 56, in __getattr__
return self.__dict__['_updated_attrs'][name]
KeyError: 'pipelines'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/gitlab/base.py", line 59, in __getattr__
value = self.__dict__['_attrs'][name]
KeyError: 'pipelines'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/gitlab/base.py", line 79, in __getattr__
return self.__dict__['_parent_attrs'][name]
KeyError: 'pipelines'
Activity
gpocentek commentedon Jun 23, 2018
Hi @rokroskar
Thanks for reporting this problem. I'll push a 1.5.1 very soon with the fix.
rokroskar commentedon Jun 24, 2018
thanks for the quick fix @gpocentek!
donbowman commentedon Aug 8, 2018
I'm still seeing this w/ python-gitlab (1.5.1) (from pypi). I double-checked, I have the change referenced in 4cf8118
Maybe related... Its a group project:
(Pdb) p project
(Pdb) p project.pipelines
*** AttributeError: pipelines
donbowman commentedon Aug 8, 2018
Confirmed. As a workaround, get the 'Project' from the 'GroupProject.id'