Re: [Archivesspace_Users_Group] EAD via API - character problem

2020-03-27 Thread Kennedy, Nancy
Here are the two versions.  One I get by using  the staff interface ‘export’ 
button.  The other via the api.

From: archivesspace_users_group-boun...@lyralists.lyrasis.org 
 On Behalf Of 
Majewski, Steven Dennis (sdm7g)
Sent: Friday, March 27, 2020 3:08 PM
To: Archivesspace Users Group 
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 
mailto:dave_m...@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: 
mailto:archivesspace_users_group-boun...@lyralists.lyrasis.org>>
 on behalf of "Kennedy, Nancy" mailto:kenne...@si.edu>>
Reply-To: Archivesspace Users Group 
mailto:archivesspace_users_group@lyralists.lyrasis.org>>
Date: Friday, March 27, 2020 at 1:41 PM
To: "Archivesspace Users Group 
(archivesspace_users_group@lyralists.lyrasis.org)"
 
mailto:archivesspace_users_group@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
kenne...@si.edu

___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group



correct.xml
Description: correct.xml


incorrect_api.xml
Description: incorrect_api.xml
___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


Re: [Archivesspace_Users_Group] EAD via API - character problem

2020-03-27 Thread Kennedy, Nancy
By directly, I mean when logged into the staff interface and use the Export 
menu option.  This results in the correct character, but not if I try via the 
API, against the same instance.
[cid:image002.jpg@01D6044C.D1150690]



From: archivesspace_users_group-boun...@lyralists.lyrasis.org 
 On Behalf Of Mayo, 
Dave
Sent: Friday, March 27, 2020 3:02 PM
To: Archivesspace Users Group 
Subject: Re: [Archivesspace_Users_Group] EAD via API - character problem

External Email - Exercise Caution
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: 
mailto:archivesspace_users_group-boun...@lyralists.lyrasis.org>>
 on behalf of "Kennedy, Nancy" mailto:kenne...@si.edu>>
Reply-To: Archivesspace Users Group 
mailto:archivesspace_users_group@lyralists.lyrasis.org>>
Date: Friday, March 27, 2020 at 1:41 PM
To: "Archivesspace Users Group 
(archivesspace_users_group@lyralists.lyrasis.org)"
 
mailto:archivesspace_users_group@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
kenne...@si.edu

___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


Re: [Archivesspace_Users_Group] EAD via API - character problem

2020-03-27 Thread Majewski, Steven Dennis (sdm7g)
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  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:  > on behalf 
> of "Kennedy, Nancy" mailto:kenne...@si.edu>>
> Reply-To: Archivesspace Users Group 
>  >
> Date: Friday, March 27, 2020 at 1:41 PM
> To: "Archivesspace Users Group 
> (archivesspace_users_group@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
> kenne...@si.edu 
>  
> ___
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group@lyralists.lyrasis.org 
> 
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group 
> 


smime.p7s
Description: S/MIME cryptographic signature
___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


Re: [Archivesspace_Users_Group] EAD via API - character problem

2020-03-27 Thread Mayo, Dave
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:  on behalf of 
"Kennedy, Nancy" 
Reply-To: Archivesspace Users Group 

Date: Friday, March 27, 2020 at 1:41 PM
To: "Archivesspace Users Group 
(archivesspace_users_group@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
kenne...@si.edu

___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


[Archivesspace_Users_Group] EAD via API - character problem

2020-03-27 Thread Kennedy, Nancy
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
kenne...@si.edu

___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group