We have developed some code to contact JIRA using Python and jira2.0 python packge
anyway sometimes we got "We cannot instantiate empty resources: {}" error in the log. any clues on this ?
We can't help you with a problem that's in your own code, especially if you have not given us the code.
You'll need to debug why the resource is empty in your code.
Hi Nic,
Error coming from one of below methods
def sync_comments(issueSource,issueDestination,instanceSource,instanceDestionation,last_run_time,last_run_time_upper_bound,side):
logging.info("Synchronizing issue comments - new issues")
try:
issue = instanceSource.issue(issueSource.key)
comments = issue.fields.comment.comments
for comment in comments:
if comment.author.name != 'lse_jira_sync_user' and comment.author.name != 'lse_sync_user':
instanceDestionation.add_comment(issueDestination, build_comment(comment, side))
except JIRAError as e:
logging.info(e)
print(e)
def sync_attachments(issueSource,issueDestination,instanceSource,instanceDestionation,last_run_time,last_run_time_upper_bound):
logging.info("Synchronizing issue attachments - new issues")
try:
issue_source = instanceSource.issue(issueSource.key)
for attachment in issue_source.fields.attachment:
if attachment.author.name != 'lse_jira_sync_user' and attachment.author.name != 'lse_sync_user':
image = attachment.get()
jira_filename = attachment.filename
with open("attachments/" + jira_filename, 'wb') as out_file:
out_file.write(image)
with open("attachments/" + jira_filename, 'rb') as f:
instanceDestionation.add_attachment(issueDestination,f)
if os.path.exists("attachments/" + jira_filename):
os.remove("attachments/" + jira_filename)
except JIRAError as e:
logging.info(e)
print(e)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also this is not for all tickets, but sometimes we are getting this error, and it was not there in the staging server. this happens only after production push
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You'll need to go through your code to work out where the empty resource is being returned.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.