Hello, team! I’m attempting to get the Jira Bridge up and running, and I’m having this issue when I attempt to run the update_shotgun_users.py script. It’s telling me “Object of type Project is not JSON serializable”
See below for the full error message. Everything else seems to be working, but I suspect the reason I’m not seeing changes update on Jira is because the users are synched correctly. Has anyone seem this before? Thanks so much!
2024-05-29 10:48:14,271 INFO [jira_session] Connected to [address] on https://[studio].atlassian.net (JIRA Cloud)
2024-05-29 10:48:14,716 INFO [update_shotgun_users] Ensuring HumanUser.sg_jira_account_id exists.
2024-05-29 10:48:14,928 INFO [update_shotgun_users] Locating JIRA project [Jira Project Key]
2024-05-29 10:48:15,178 INFO [update_shotgun_users] Retrieving all Flow Production Tracking users
Traceback (most recent call last):
File "C:\ProgramData\Flow-Production-Tracking-Jira-Bridge\sg-jira-bridge\update_shotgun_users.py", line 157, in <module>
sys.exit(main())
File "C:\ProgramData\Flow-Production-Tracking-Jira-Bridge\sg-jira-bridge\update_shotgun_users.py", line 151, in main
sync_jira_users_into_shotgun(sg, jira, project)
File "C:\ProgramData\Flow-Production-Tracking-Jira-Bridge\sg-jira-bridge\update_shotgun_users.py", line 73, in sync_jira_users_into_shotgun
jira_user = jira.find_jira_assignee_for_issue(
File "C:\ProgramData\Flow-Production-Tracking-Jira-Bridge\sg-jira-bridge\sg_jira\jira_session.py", line 242, in find_jira_assignee_for_issue
return self.find_jira_user(
File "C:\ProgramData\Flow-Production-Tracking-Jira-Bridge\sg-jira-bridge\sg_jira\jira_session.py", line 346, in find_jira_user
jira_users = search_method(**search_params)
File "C:\Python310\lib\site-packages\jira\client.py", line 3784, in search_assignable_users_for_issues
return self._fetch_pages(
File "C:\Python310\lib\site-packages\jira\client.py", line 808, in _fetch_pages
page_params = json_params()
File "C:\Python310\lib\site-packages\jira\client.py", line 806, in json_params
return json.loads(json.dumps(params.copy())) if params else {}
File "C:\Python310\lib\json\__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "C:\Python310\lib\json\encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Python310\lib\json\encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "C:\Python310\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Project is not JSON serializable