Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Struggling to get component lead using jira-python

tim hood
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 15, 2019

Using jira-python I can get a list of components for projects and I can get the component name and project but component.lead fails.   But I can see the component.lead field in the PyCharm debugger ??  Help.



for
component in components:
cols = list()

cols.append(component.name)
cols.append(component.project)
cols.append(component.lead)

 

  File "C:/My_Workspaces/PycharmProjects/JIRA/components.py", line 62, in main
cols.append(component.lead)
File "C:\Python37-32\lib\site-packages\jira\resources.py", line 177, in __getattr__
raise AttributeError("%r object has no attribute %r (%s)" % (self.__class__, item, e))
AttributeError: <class 'jira.resources.Component'> object has no attribute 'lead' ('Component' object is not subscriptable)

 

1 answer

0 votes
Andrew
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2019

Hi @tim hood ,

I'm not sure but maybe some problem in 'list'? Can list in python hold different type or it as array? Maybe 'lead' have other type?

B.R.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events