sul-dlss / dor-services-app

A Rails application exposing Digital Object Registry functions as a RESTful HTTP API
https://sul-dlss.github.io/dor-services-app/
Other
3 stars 2 forks source link

To Fedora error: key not found: "person" (title mapping) #1366

Closed justinlittman closed 3 years ago

justinlittman commented 4 years ago

For druid:pf425xt0593:

Error: key not found: "person"

Expected XML:
<?xml version="1.0"?>
<mods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/mods/v3" xmlns:mods="http://www.loc.gov/mods/v3" version="3.6" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-6.xsd">
  <titleInfo altRepGroup="03">
    <title>Sefer Or Ya&#x2BB;a&#x1E33;ov</title>
    <subTitle>be&#x2BC;ur &#x2BB;al agadot &#x1E25;azal &#x1E7F;e-&#x2BB;al kamah ma&#x2BC;amarim mi-Pir&#x1E33;e avot &#x1E7F;e-Avot de-Rabi Natan &#x1E7F;e-&#x2BB;al ma&#x2BC;amre Midrash rabah</subTitle>
  </titleInfo>
  <titleInfo type="alternative" displayLabel="Title on t.p. verso:">
    <title>Or I&#x361;Akov</title>
  </titleInfo>
  <titleInfo type="uniform" nameTitleGroup="1" altRepGroup="02">
    <title>Or Ya&#x2BB;a&#x1E33;ov</title>
  </titleInfo>
  <name type="personal" usage="primary" altRepGroup="01" nameTitleGroup="1">
    <namePart>Uri Ya&#x2BB;a&#x1E33;ov ben Naftali Herts</namePart>
  </name>
  <typeOfResource>text</typeOfResource>
  <originInfo altRepGroup="04">
    <place>
      <placeTerm type="code" authority="marccountry">li</placeTerm>
    </place>
    <place>
      <placeTerm type="text">&#x1E7E;ilna</placeTerm>
    </place>
    <publisher>Bi-defus A. Ts. &#x1E32;atsinelinboigen</publisher>
    <dateIssued>1890</dateIssued>
    <issuance>monographic</issuance>
  </originInfo>
  <originInfo script="" altRepGroup="04">
    <place>
      <placeTerm type="text">&#x5D5;&#x5D5;&#x5D9;&#x5DC;&#x5E0;&#x5D0; :</placeTerm>
    </place>
    <publisher>&#x5D1;&#x5D3;&#x5E4;&#x5D5;&#x5E1; &#x5D0;. &#x5E6;. &#x5E7;&#x5D0;&#x5E6;&#x5D9;&#x5E0;&#x5E2;&#x5DC;&#x5D9;&#x5E0;&#x5D1;&#x5D5;&#x5D9;&#x5D2;&#x5E2;&#x5DF;,</publisher>
    <dateIssued>1890.</dateIssued>
  </originInfo>
  <language>
    <languageTerm authority="iso639-2b" type="code">heb</languageTerm>
  </language>
  <physicalDescription>
    <form authority="marcform">print</form>
    <extent>134 p. ; 26 cm.</extent>
  </physicalDescription>
  <note type="statement of responsibility" altRepGroup="00">&#x1E25;ibro Uri Ya&#x2BB;a&#x1E33;ov ben Naftali Herts.</note>
  <subject authority="lcsh">
    <titleInfo>
      <title>Mishnah</title>
      <partName>Avot</partName>
    </titleInfo>
    <genre>Commentaries</genre>
  </subject>
  <subject authority="lcsh">
    <titleInfo>
      <title>Talmud</title>
      <partName>Minor tractates. Avot de-Rabbi Nathan</partName>
    </titleInfo>
    <genre>Commentaries</genre>
  </subject>
  <subject authority="lcsh">
    <topic>Aggada</topic>
    <genre>Commentaries</genre>
  </subject>
  <classification authority="lcc">BM516.5 .U75 1890</classification>
  <name type="personal" usage="primary" altRepGroup="01" script="" nameTitleGroup="1">
    <namePart>&#x5D0;&#x5D5;&#x5E8;&#x5D9; &#x5D9;&#x5E2;&#x5E7;&#x5D1; &#x5D1;&#x5DF; &#x5E0;&#x5E4;&#x5EA;&#x5DC;&#x5D9; &#x5D4;&#x5E2;&#x5E8;&#x5E5;</namePart>
  </name>
  <titleInfo type="uniform" nameTitleGroup="1" altRepGroup="02" script="">
    <title>&#x5D0;&#x5D5;&#x5E8; &#x5D9;&#x5E2;&#x5E7;&#x5D1;</title>
  </titleInfo>
  <titleInfo altRepGroup="03" script="">
    <title>&#x5E1;&#x5E4;&#x5E8; &#x5D0;&#x5D5;&#x5E8; &#x5D9;&#x5E2;&#x5E7;&#x5D1;</title>
    <subTitle>&#x5D1;&#x5D9;&#x5D0;&#x5D5;&#x5E8; &#x5D0;&#x5DC; &#x5E2;&#x5D2;&#x5D3;&#x5D5;&#x5EA; &#x5D7;&#x5D6;&#x5F3;&#x5F3;&#x5DC; &#x5D5;&#x5E2;&#x5DC; &#x5DB;&#x5DE;&#x5D4; &#x5DE;&#x5D0;&#x5DE;&#x5E8;&#x5D9;&#x5DD; &#x5DE;&#x5E4;&#x5E8;&#x5E7;&#x5D9; &#x5D0;&#x5D1;&#x5D5;&#x5EA; &#x5D5;&#x5D0;&#x5D1;&#x5D5;&#x5EA; &#x5D2;&#x5E8;&#x5D1;&#x5D9; &#x5E0;&#x5EA;&#x5DF; &#x5D5;&#x5E2;&#x5DC; &#x5DE;&#x5D0;&#x5DE;&#x5E8;&#x5D9; &#x5DE;&#x5D3;&#x5E8;&#x5E9; &#x5E8;&#x5D1;&#x5D4;</subTitle>
  </titleInfo>
  <note type="statement of responsibility" altRepGroup="00" script="">&#x5D7;&#x5D1;&#x5E8;&#x5D5; &#x5D0;&#x5D5;&#x5E8;&#x5D9; &#x5D9;&#x5E2;&#x5E7;&#x5D1; &#x5D1;&#x5DF; &#x5E0;&#x5E4;&#x5EA;&#x5DC;&#x5D9; &#x5D4;&#x5E2;&#x5E8;&#x5E5;.</note>
  <recordInfo>
    <descriptionStandard>aacr</descriptionStandard>
    <recordContentSource authority="marcorg">MH</recordContentSource>
    <recordCreationDate encoding="marc">971007</recordCreationDate>
    <recordIdentifier source="SIRSI">a3422196</recordIdentifier>
    <recordOrigin>Converted from MARCXML to MODS version 3.6 using MARC21slim2MODS3-6_SDR.xsl (SUL version 1 2018/06/13; LC Revision 1.118 2018/01/31)</recordOrigin>
  </recordInfo>
</mods>

Cocina:
{
  "title": [
    {
      "parallelValue": [
        {
          "structuredValue": [
            {
              "value": "Sefer Or Yaʻaḳov",
              "type": "main title"
            },
            {
              "value": "beʼur ʻal agadot ḥazal ṿe-ʻal kamah maʼamarim mi-Pirḳe avot ṿe-Avot de-Rabi Natan ṿe-ʻal maʼamre Midrash rabah",
              "type": "subtitle"
            }
          ]
        },
        {
          "structuredValue": [
            {
              "value": "ספר אור יעקב",
              "type": "main title"
            },
            {
              "value": "ביאור אל עגדות חז׳׳ל ועל כמה מאמרים מפרקי אבות ואבות גרבי נתן ועל מאמרי מדרש רבה",
              "type": "subtitle"
            }
          ]
        }
      ],
      "type": "parallel",
      "status": "primary"
    },
    {
      "parallelValue": [
        {
          "structuredValue": [
            {
              "value": "Uri Yaʻaḳov ben Naftali Herts",
              "type": "person"
            },
            {
              "value": "אורי יעקב בן נפתלי הערץ",
              "type": "person"
            },
            {
              "value": "Or Yaʻaḳov",
              "type": "title"
            }
          ],
          "type": "uniform"
        },
        {
          "structuredValue": [
            {
              "value": "Uri Yaʻaḳov ben Naftali Herts",
              "type": "person"
            },
            {
              "value": "אורי יעקב בן נפתלי הערץ",
              "type": "person"
            },
            {
              "value": "אור יעקב",
              "type": "title"
            }
          ],
          "type": "uniform"
        }
      ],
      "type": "parallel",
      "status": "primary"
    },
    {
      "value": "Or I͡Akov",
      "type": "alternative",
      "displayLabel": "Title on t.p. verso:"
    }
  ],
  "contributor": [
    {
      "name": [
        {
          "value": "Uri Yaʻaḳov ben Naftali Herts"
        }
      ],
      "type": "person",
      "status": "primary"
    },
    {
      "name": [
        {
          "value": "אורי יעקב בן נפתלי הערץ"
        }
      ],
      "type": "person",
      "status": "primary"
    }
  ],
  "event": [
    {
      "type": "publication",
      "date": [
        {
          "value": "1890"
        }
      ],
      "contributor": [
        {
          "name": [
            {
              "value": "Bi-defus A. Ts. Ḳatsinelinboigen"
            }
          ],
          "type": "organization",
          "role": [
            {
              "value": "publisher",
              "code": "pbl",
              "uri": "http://id.loc.gov/vocabulary/relators/pbl",
              "source": {
                "code": "marcrelator",
                "uri": "http://id.loc.gov/vocabulary/relators/"
              }
            }
          ]
        }
      ],
      "location": [
        {
          "code": "li",
          "source": {
            "code": "marccountry"
          }
        },
        {
          "value": "Ṿilna"
        }
      ],
      "note": [
        {
          "value": "monographic",
          "type": "issuance",
          "source": {
            "value": "MODS issuance terms"
          }
        }
      ]
    },
    {
      "type": "publication",
      "date": [
        {
          "value": "1890."
        }
      ],
      "contributor": [
        {
          "name": [
            {
              "value": "בדפוס א. צ. קאצינעלינבויגען,"
            }
          ],
          "type": "organization",
          "role": [
            {
              "value": "publisher",
              "code": "pbl",
              "uri": "http://id.loc.gov/vocabulary/relators/pbl",
              "source": {
                "code": "marcrelator",
                "uri": "http://id.loc.gov/vocabulary/relators/"
              }
            }
          ]
        }
      ],
      "location": [
        {
          "value": "ווילנא :"
        }
      ]
    }
  ],
  "form": [
    {
      "value": "Commentaries",
      "type": "genre"
    },
    {
      "value": "Commentaries",
      "type": "genre"
    },
    {
      "value": "Commentaries",
      "type": "genre"
    },
    {
      "value": "text",
      "type": "resource type",
      "source": {
        "value": "MODS resource type"
      }
    },
    {
      "value": "print",
      "type": "form",
      "source": {
        "code": "marcform"
      }
    },
    {
      "value": "134 p. ; 26 cm.",
      "type": "extent"
    }
  ],
  "language": [
    {
      "code": "heb",
      "source": {
        "code": "iso639-2b"
      }
    }
  ],
  "note": [
    {
      "value": "ḥibro Uri Yaʻaḳov ben Naftali Herts.",
      "type": "statement of responsibility"
    },
    {
      "value": "חברו אורי יעקב בן נפתלי הערץ.",
      "type": "statement of responsibility"
    }
  ],
  "subject": [
    {
      "structuredValue": [
        {
          "value": "Mishnah",
          "type": "title"
        },
        {
          "value": "Commentaries",
          "type": "genre"
        }
      ],
      "source": {
        "code": "lcsh"
      }
    },
    {
      "structuredValue": [
        {
          "value": "Talmud",
          "type": "title"
        },
        {
          "value": "Commentaries",
          "type": "genre"
        }
      ],
      "source": {
        "code": "lcsh"
      }
    },
    {
      "structuredValue": [
        {
          "value": "Aggada",
          "type": "topic"
        },
        {
          "value": "Commentaries",
          "type": "genre"
        }
      ],
      "source": {
        "code": "lcsh"
      }
    },
    {
      "value": "BM516.5 .U75 1890",
      "type": "classification",
      "source": {
        "code": "lcc"
      }
    }
  ],
  "adminMetadata": {
    "contributor": [
      {
        "name": [
          {
            "code": "MH",
            "source": {
              "code": "marcorg"
            }
          }
        ],
        "type": "organization",
        "role": [
          {
            "value": "original cataloging agency"
          }
        ]
      }
    ],
    "event": [
      {
        "type": "creation",
        "date": [
          {
            "value": "971007",
            "encoding": {
              "code": "marc"
            }
          }
        ]
      }
    ],
    "note": [
      {
        "value": "Converted from MARCXML to MODS version 3.6 using MARC21slim2MODS3-6_SDR.xsl (SUL version 1 2018/06/13; LC Revision 1.118 2018/01/31)",
        "type": "record origin"
      }
    ],
    "standard": {
      "code": "aacr"
    },
    "identifier": [
      {
        "value": "a3422196",
        "source": {
          "value": "SIRSI"
        }
      }
    ]
  }
}

Backtrace:
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:59:in `fetch'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:59:in `block (3 levels) in write_parallel'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:58:in `each'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:58:in `block (2 levels) in write_parallel'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.10/lib/nokogiri/xml/builder.rb:394:in `insert'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.10/lib/nokogiri/xml/builder.rb:377:in `method_missing'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:57:in `block in write_parallel'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:51:in `each'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:51:in `each_with_index'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:51:in `write_parallel'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:27:in `block in write'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:23:in `each'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:23:in `each_with_index'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:23:in `write'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive/title.rb:14:in `write'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive.rb:24:in `block (2 levels) in transform'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.10/lib/nokogiri/xml/builder.rb:394:in `insert'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.10/lib/nokogiri/xml/builder.rb:377:in `method_missing'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive.rb:20:in `block in transform'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.10/lib/nokogiri/xml/builder.rb:295:in `initialize'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive.rb:19:in `new'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive.rb:19:in `transform'
/Users/jlittman/data/sdr/dor-services-app/app/services/cocina/to_fedora/descriptive.rb:11:in `transform'
bin/validate-cocina-roundtrip:32:in `round_tripped_xml'
bin/validate-cocina-roundtrip:161:in `validate_druid'
bin/validate-cocina-roundtrip:188:in `block in <main>'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/parallel-1.20.0/lib/parallel.rb:507:in `call_with_index'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/parallel-1.20.0/lib/parallel.rb:477:in `process_incoming_jobs'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/parallel-1.20.0/lib/parallel.rb:459:in `block in worker'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/parallel-1.20.0/lib/parallel.rb:450:in `fork'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/parallel-1.20.0/lib/parallel.rb:450:in `worker'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/parallel-1.20.0/lib/parallel.rb:441:in `block in create_workers'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/parallel-1.20.0/lib/parallel.rb:440:in `each'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/parallel-1.20.0/lib/parallel.rb:440:in `each_with_index'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/parallel-1.20.0/lib/parallel.rb:440:in `create_workers'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/parallel-1.20.0/lib/parallel.rb:380:in `work_in_processes'
/Users/jlittman/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/parallel-1.20.0/lib/parallel.rb:283:in `map'
bin/validate-cocina-roundtrip:187:in `<main>'
justinlittman commented 4 years ago

Depends on #1384