llama-hub icon indicating copy to clipboard operation
llama-hub copied to clipboard

Jira Reader: TypeError: 'NoneType' object is not subscriptable.

Open shikhar-sharma1703 opened this issue 1 year ago • 4 comments

Code:

from llama_index import download_loader
import os

JiraReader = download_loader('JiraReader')
reader = JiraReader(email=EMAIL, api_token=JIRA_TOKEN,
                    server_url=SERVER_URL)

documents = reader.load_data(query='project=first-project')

print(documents)

Error:

Traceback (most recent call last):
  File "/Users/shikharsharma/Desktop/python-tests/jira/jira-connector.py", line 12, in <module>
    documents = reader.load_data(query='project=first-project')
  File "/Users/shikharsharma/Library/Python/3.9/lib/python/site-packages/llama_index/readers/llamahub_modules/jira/base.py", line 40, in load_data
    if issue.raw['fields']['customfield_10009']['showField']:
TypeError: 'NoneType' object is not subscriptable

shikhar-sharma1703 avatar Apr 13 '23 09:04 shikhar-sharma1703

I get the same error. For our Jira Tickets, I can't find the 'customfield_10009' field. Do you know if we need this field? Otherwise, can we get deleted maybe this code part?

MarkusOdenthal avatar Apr 17 '23 08:04 MarkusOdenthal

There is also another issue that we can only get 50 issues per query. Maybe we can also implement code to get all issues for a query. I can do it @emptycrown if you're ok with this?

MarkusOdenthal avatar Apr 17 '23 08:04 MarkusOdenthal

@BearGuy do you happen to know what is causing this?

jerryjliu avatar Apr 18 '23 06:04 jerryjliu

There is also another issue that we can only get 50 issues per query. Maybe we can also implement code to get all issues for a query. I can do it @emptycrown if you're ok with this?

@MarkusOdenthal would love that as a feature!

jerryjliu avatar Apr 18 '23 06:04 jerryjliu

Sounds to be fixed, since there's no more this field

closing for now

EmanuelCampos avatar Oct 05 '23 14:10 EmanuelCampos