[Archivesspace_Users_Group] EAD via API - character problem

Kennedy, Nancy KennedyN at si.edu
Fri Mar 27 16:57:44 EDT 2020


Here are the two versions.  One I get by using  the staff interface ‘export’ button.  The other via the api.

From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> On Behalf Of Majewski, Steven Dennis (sdm7g)
Sent: Friday, March 27, 2020 3:08 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] EAD via API - character problem

External Email - Exercise Caution
And maybe send the resulting XML or at least diffs of the two.
( Guessing that there might be a mismatch of file encoding and xml encoding declaration. )





On Mar 27, 2020, at 3:02 PM, Mayo, Dave <dave_mayo at harvard.edu<mailto:dave_mayo at harvard.edu>> wrote:

Can you be more precise about what “directly from the archivesspace” means?  What page (URL) and control on the page you’re using to generate this?  I want to make sure it’s the same code path in both cases.

Also, when you say “locally,” do you just mean the script is running locally against the same ASpace instance, or is it a different ASpace instance from the one where you’re getting correct results?
--
Dave Mayo (he/him)
Senior Digital Library Software Engineer
Harvard University > HUIT > LTS

From: <archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of "Kennedy, Nancy" <KennedyN at si.edu<mailto:KennedyN at si.edu>>
Reply-To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Date: Friday, March 27, 2020 at 1:41 PM
To: "Archivesspace Users Group (archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>)" <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: [Archivesspace_Users_Group] EAD via API - character problem

Hi all –
Today I noticed that if I export an EAD with “Yin-Hsü” directly from the archivesspace, my EAD results carry through with the correct encoding.

But, when I export locally via the API, I end up with “Yin-Hs端”.   I’m using python 3.7.4, via local windows machine.  I’ve tried both archivessnake and just using requests, but I still end up with 端.

Suggestions?  Here’s what I’m doing via asnake:

export_options = '?include_daos=true&?include_unpublished=false&?numbered_cs=false'
for i in resource_ids:
ead = client.get(repo['uri']
                             +'/resource_descriptions/'+str(i)+'.xml'
                             + export_options).text

Nancy Kennedy
Smithsonian Institution
kennedyn at si.edu<mailto:kennedyn at si.edu>

_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fmailman%2Flistinfo%2Farchivesspace_users_group&data=02%7C01%7CKennedyN%40si.edu%7C2319e6bb352142430e4708d7d2823dd7%7C989b5e2a14e44efe93b78cdd5fc5d11c%7C0%7C0%7C637209329133406866&sdata=A1ERfao94bBiECWmGANe%2BSeSZOSMbIlJSVHx%2FwjBIa4%3D&reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20200327/54b67916/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: correct.xml
Type: application/xml
Size: 1472 bytes
Desc: correct.xml
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20200327/54b67916/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: incorrect_api.xml
Type: application/xml
Size: 1472 bytes
Desc: incorrect_api.xml
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20200327/54b67916/attachment-0001.xml>


More information about the Archivesspace_Users_Group mailing list