[Archivesspace_Users_Group] EAD import problem id_0 already in use

Chris Fitzpatrick Chris.Fitzpatrick at lyrasis.org
Wed May 21 04:20:59 EDT 2014


Hi All,

Looping back to the group. 

Miloche was kind enough to send me some samples of EADs that were causing problems and I was able to identify two bugs that were happening.

One was that <unittitle> and <unitid> in <relatedmaterials> were sometimes being applied as the titles and/or ids of the parent resource.
The other was that the processing of extents text was running into problems if there was leading and trailing whitespace in the text when it attempts to parse out the number and unit. 

I have tickets here : 

https://www.pivotaltracker.com/story/show/71720594
https://www.pivotaltracker.com/story/show/71720744

I have also committed a fix that should be included in the next release. 

But, if you want to apply the fix now to your v1.0.9, do the following :

1 ) Download the file at https://github.com/archivesspace/archivesspace/blob/master/backend/app/converters/ead_converter.rb ( you can use the "raw" url at https://raw.githubusercontent.com/archivesspace/archivesspace/master/backend/app/converters/ead_converter.rb ) 
2) Edit the file and remove "require_relative 'converter' " ( first line ) and "  require_relative 'lib/xml_sax'"  (line 6).
3) Put this file in plugins/local/backend/model (assumes you're still loading the local plugin, which is set as a default ) 

Please try this out and let me know if you have any issues with it...
Thanks again!
best, chris. 



Chris Fitzpatrick | Developer, ArchivesSpace
Skype: chrisfitzpat  | Phone: 918.236.6048
http://archivesspace.org/

________________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Chris Fitzpatrick <Chris.Fitzpatrick at lyrasis.org>
Sent: Monday, May 19, 2014 12:05 PM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] EAD import problem id_0 already in use

Hi Everyone,

So, a bunch of errors going on here...

Bridger:

It looks like you're getting two errors there...one is that the eadid has to be unique across the repository.
However, you're saying the eadid's are unique across your EADs, so possibly you're trying to reimport an EAD that is already there?

The other error you're seeing is that the id_0 has to be unique. A resource has it's unitid set to it's first id ( id_0 ), which has to be unique. Is it possible that you have 2 resources in your EAD with the same unitid?

If you can email me directly your EAD, I can have a look at it..


Miloche:

The error you're seeing now is about an <extent> node. The converter tries to parse out the number and type in the <extend> node ( it looks for some digits followed by some text, like "2 boxes" ), but it might be running into an issue. Are you seeing anything in the EAD that might be causing this? If you can email me your EAD, I can look at that as well..


Elizabeth:

Your indexer should definitely not be conking out. How much memory do you have on this server?





Chris Fitzpatrick | Developer, ArchivesSpace
Skype: chrisfitzpat  | Phone: 918.236.6048
http://archivesspace.org/

________________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Elizabeth Dunham <Elizabeth.Dunham at asu.edu>
Sent: Saturday, May 17, 2014 12:32 AM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] EAD import problem id_0 already in use

Might it be a problem with the indexer?

I got the same error when importing guides, and it turned out that the indexer wasn't running.  I'd try to import a guide, it would report success, I would look for the guide and not find it, try to import the guide again, and it would tell me it couldn't do that because the ID was in use.  Restarting the server works, but that is my only indexer maintenance option - you can probably find something a little more nuanced.  I've actually had a lot of trouble with the indexer conking out after 48-72 hours of restart/upgrade, but I don't know why.

Hope that helps!

Elizabeth Dunham

------------------------
Assistant Archivist
Arizona State University Libraries
Archives and Special Collections
Tempe, AZ 85287-1006
Elizabeth.Dunham at asu.edu

-----Original Message-----
From: archivesspace_users_group-bounces at lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Bridger Dyson-Smith
Sent: Friday, May 16, 2014 12:18 PM
To: archivesspace_users_group at lyralists.lyrasis.org
Subject: Re: [Archivesspace_Users_Group] EAD import problem id_0 already in use

On 05/16/2014 11:19, Kottman, Miloche wrote:
> How fortuitous!  I was just going to test to see if this was still an issue in version 1.0.9.
>
Oh dear...

> In version 1.0.7, that message showed up when the EAD had a related or separated materials section AND you'd already loaded the EAD for the related or separated material.
>
> This happens because instead of using the <unittitle> and <unitid> for the described materials, the importer is using the last <unittitle> <unitid> combination it finds in either the related or separated material section (we have EADs listing multiple related materials and I've noticed it selects the last title).  This title and id is, of course, going to match the title and id in the related or separated EAD.
>
That's odd, because the <unittitle> and <unitid> in the EAD that threw the error only appear in two EADs: in the error-throwing EAD and in another that wasn't in my test batch. I've just checked a couple of other EADs that use <relatedmaterial> and we aren't using <unittitle>/<unitid> in that element.

I don't doubt you - I don't know enough Ruby (or enough about
ArchivesSpace) to get what's going on with the import feature.

I do think it's a bit odd, though. Is there a published rational for that behavior? I'd like to know more.

> Even if you don't get this message when loading an EAD, if it has a
> related or separated materials section, you should check the EAD in
> ArchivesSpace to ensure the correct title and id are in the record
> (it's likely to be one of the titles in the related/separated section)
>
> And FYI...  just tested in version 1.0.9 and it still errors out, but
> I get a different error message:  Error: #<:ValidationException:
> {:errors=>{"extents"=>["At least 1 item(s) is required"]}}>
>
> --Miloche
>
> -----Original Message-----
> From: archivesspace_users_group-bounces at lyralists.lyrasis.org
> [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On
> Behalf Of Bridger Dyson-Smith
> Sent: Friday, May 16, 2014 9:39 AM
> To: Archivesspace Users Group
> Subject: [Archivesspace_Users_Group] EAD import problem id_0 already
> in use
>
> Hi all,
>
> I'm getting the following error from a test import of ~100 EADs:
> "Error: Problem creating 'University of Tennessee President's Papers':
> id_0 That ID is already in use, ead_id Must be unique"
>
> My <eadid> values are unique across our collections, so I'm not sure how/why this is happening. Could someone shed some light on this?
>
>
> Thanks,
> Bridger
> --
> Bridger Dyson-Smith
> University of Tennessee Libraries
> Digital Initiatives
> _______________________________________________

Thank you for the response.

Best,
Bridger

_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group



More information about the Archivesspace_Users_Group mailing list