--
You received this message because you are subscribed to the Google Groups "Archivesspace_Users_Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Archivesspace_User...@lyrasislists.org.
To view this discussion visit https://groups.google.com/a/lyrasislists.org/d/msgid/Archivesspace_Users_Group/CAHXNEzrsQSbJt%2BjddzkHVjooJuTXF1nXQE8-gDo0CENcZS38dw%40mail.gmail.com.
I wonder…
I have a recent-ish memory that I had an issue with how to encode the payload and I think it only happened to me when 4.0.0 came out. This might not apply to Lynn’s scenario because there were no errors, but it may apply to Michelle. I helped another user with it, which helped confirm it was happening for me. I use requests, so this may not be relevant to all of you, but I had to switch from using json.dumps in the POST. Credit to Julia C. on code4lib slack, where she provided a Before and After example after we chatted, which I’ve modified below.
Before:
data = requests.post(baseURL + uri, headers=headers,data=json.dumps(data_that_is_a_python_dictionary_or_list)).json()
After:
data = requests.post(baseURL + uri, headers=headers, json=data_that_is_a_python_dictionary_or_list).json()
If it’s this same issue, it might also be solved by being more explicit in setting the content-type parameter in the header to application/json
This was definitely an issue for me, I just don’t know if it’s the same issue.
Archival Systems Technical Lead
**My working day may not be your working day. Please do not feel obliged to reply to this email outside of your regular working hours.**
To view this discussion visit https://groups.google.com/a/lyrasislists.org/d/msgid/Archivesspace_Users_Group/CH2PR04MB6726C3D2EA424FBD88A723DDCE34A%40CH2PR04MB6726.namprd04.prod.outlook.com.
I agree Regine, that it seems like the issue is passing an already-serialized JSON string into the json= (based on my example in Python).
Elizabeth, are you using json.dumps anywhere above this? Can you check the type of your payload to make sure it’s a dict or list and not a string?
Hi Regine,
In your case, I think the issue is probably related to this change in the Ruby archivesspace-client gem. https://github.com/lyrasis/archivesspace-client/pull/22 That would explain why it fails on both 3.51 and 4.1, while the Python users seem to have no problem with 3.51.
I hope this helps.
Brian
From: "'Regine I. Heberlein' via Archivesspace_Users_Group" <Archivesspac...@lyrasislists.org>
Reply-To: "Regine I. Heberlein" <hebe...@princeton.edu>
Date: Monday, August 18, 2025 at 1:59 PM
To: Elizabeth Peters <pet...@bc.edu>