Jira response (class: Issue ) is not picklable
See original GitHub issuelooks like Issue class is not pickable
sqlalchemy.exc.InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (pickle.PicklingError) Can't pickle <class 'jira.resources.PropertyHolder'>: it's not found as jira.resources.PropertyHolder [SQL: u'INSERT INTO xcom (`key`, value, timestamp, execution_date, task_id, dag_id) VALUES (%s, %s, now(), %s, %s, %s)'] [parameters: [{'task_id': '<task_id>', 'execution_date': datetime.datetime(2016, 12, 13, 0, 4), 'value': [<JIRA Issue: key=u'<project>-1855', id=u'<id>'>], 'key': 'result_set', 'dag_id': '<dag_id>'}]]
I also tried this with manual json.dumps to confirm, here is the stacktrace
Traceback (most recent call last):
...
.....
.......
"/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 244, in dumps
return _default_encoder.encode(obj)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 207, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 270, in iterencode
return _iterencode(o, 0)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 184, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <JIRA Issue: key=u'<project>-1855', id=u'<id>'> is not JSON serializable
Do anybody know how can should I serialize any response from JIRA ?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:11 (2 by maintainers)
Top Results From Across the Web
How to serialize a jira issue object in Python? - Stack Overflow
jira -cache package worked for me. It can cache an issue list and load it. https://pypi.org/project/jira-cache/. Example:
Read more >JIRA Resource Property Holder is not Picklable
But it seems that JIRA Resource object is not picklable and multiprocessing can't be used. But multithreading can be used.
Read more >Solved: Notification still get sent out even though Notifi...
I've updated the Notification Scheme to delete everyone with "Updated issue" and yet I still get JIRA notifications. I tried the Notification Helper...
Read more >RESTException (Atlassian JIRA 7.2.2 API)
Class RESTException · javax.ws.rs.WebApplicationException · com.atlassian.jira.rest.v2.issue.RESTException.
Read more >Issues in updating custom field of a JIRA in python
I have a JIRA Ticket where I am trying to update the field of "Verified Version:" of ... When not version is updated,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there any update on this? @mdoar 's solution works for pickle.dump, but I’m not able to load the dumped data back with pickle.load.
Would be really cool if this could make it into a release soon…