Linked Data Service Trouble (Library of Congress, LOC)

Good day,

I am trying to import a vocabulary from the Library of Congress linked data service page, the MARC Relator list. I have also tried to use the Linked Open Vocabulary site’s page, also to no avail.

Whenever I try to save the “Vocabulary URL” as .json or .nt I just get the basic red error banner with “error importing vocabulary. check the file or URL”

The only constructive error message I receive is from this input:

Label- MARC Relator
Namespace URI- Relators - LC Linked Data Service: Authorities and Vocabularies | Library of Congress
Namespace Prefix- mrel
Vocabulary URL- http://id.loc.gov/vocabulary/relators.rdf

and the error displayed is:
<InvalidArgumentException: $value cannot have both and language and a datatype in /home/grenadev/lucipac.org/vendor/sweetrdf/easyrdf/lib/Graph.php:579
Stack trace:
#0 /home/grenadev/lucipac.org/vendor/sweetrdf/easyrdf/lib/Graph.php(961): EasyRdf\Graph->checkValueParam(Array)
#1 /home/grenadev/lucipac.org/vendor/sweetrdf/easyrdf/lib/Parser.php(144): EasyRdf\Graph->add(‘http://id.loc.g…’, ‘http://www.w3.o…’, Array)
#2 /home/grenadev/lucipac.org/vendor/sweetrdf/easyrdf/lib/Parser/RdfXml.php(194): EasyRdf\Parser->addTriple(Object(EasyRdf\ParsedUri), ‘http://www.w3.o…’, Array)
#3 /home/grenadev/lucipac.org/vendor/sweetrdf/easyrdf/lib/Parser/RdfXml.php(715): EasyRdf\Parser\RdfXml->add(Object(EasyRdf\ParsedUri), ‘http://www.w3.o…’, ‘’, ‘uri’, ‘literal’, ‘http://www.w3.o…’, ‘en’)
#4 /home/grenadev/lucipac.org/vendor/sweetrdf/easyrdf/lib/Parser/RdfXml.php(244): EasyRdf\Parser\RdfXml->endState6(‘http://www.w3.o…’)
#5 [internal function]: EasyRdf\Parser\RdfXml->endElementHandler(Resource id #731, ‘http://www.w3.o…’)
#6 /home/grenadev/lucipac.org/vendor/sweetrdf/easyrdf/lib/Parser/RdfXml.php(811): xml_parse(Resource id #731, ‘<rdf:RDF xmlns:…’, true)
#7 /home/grenadev/lucipac.org/vendor/sweetrdf/easyrdf/lib/Graph.php(252): EasyRdf\Parser\RdfXml->parse(Object(EasyRdf\Graph), ‘<rdf:RDF xmlns:…’, Object(EasyRdf\Format), ‘http://id.loc.g…’)
#8 /home/grenadev/lucipac.org/vendor/sweetrdf/easyrdf/lib/Graph.php(387): EasyRdf\Graph->parse(‘<rdf:RDF xmlns:…’, Object(EasyRdf\Format), ‘http://id.loc.g…’)
#9 /home/grenadev/lucipac.org/application/src/Stdlib/RdfImporter.php(116): EasyRdf\Graph->load(‘http://id.loc.g…’, ‘application/rdf…’)
#10 /home/grenadev/lucipac.org/application/src/Stdlib/RdfImporter.php(156): Omeka\Stdlib\RdfImporter->getMembers(‘url’, ‘http://id.loc.g…’, Array)
#11 /home/grenadev/lucipac.org/application/src/Controller/Admin/VocabularyController.php(94): Omeka\Stdlib\RdfImporter->import(‘url’, Array, Array)
#12 /home/grenadev/lucipac.org/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Omeka\Controller\Admin\VocabularyController->importAction()
#13 /home/grenadev/lucipac.org/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#14 /home/grenadev/lucipac.org/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#15 /home/grenadev/lucipac.org/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#16 /home/grenadev/lucipac.org/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#17 /home/grenadev/lucipac.org/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
#18 /home/grenadev/lucipac.org/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#19 /home/grenadev/lucipac.org/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#20 /home/grenadev/lucipac.org/index.php(21): Laminas\Mvc\Application->run()
#21 {main}>

Any help or insight is greatly appreciated! Thank you.
-Renee

This worked for me:

  • Label: MARC Relator
  • Namespace URI: http://id.loc.gov/vocabulary/relators/
  • Namespace prefix: mrel
  • Import type: URL
  • File URL: https://lov.linkeddata.es/dataset/lov/vocabs/mrel/versions/2014-06-03.n3
  • File format: Notation3 (.n3)

Thanks for your reply JimSafley,

I just tried that and it gave me the default red banner “error importing vocabulary, check file or URL”

.n3 is a file type that I am unfamiliar with and do not know how to teach it to OmekaS.

I tried adding n3 into the acceptable file types in the Admin settings, but that didn’t seem to help.

What version of Omeka are you using? Make sure you have a trailing forward slash on the namespace URI. You need not be concerned about whether Omeka accepts a n3 file type.

Unfortunately, no dice. Same default error message after ensuring the “/” at the end of the namespace URI.

I’m using Omeka S Version 4.0.4

Thanks for the info. I’ve reproduced the error. This works for me on Omeka 4.0.4: do the same as above but use file format “Turtle (.ttl)”.

Yay! Success! Thank you JimSafley for your expertise!
-Renee

P.S. If anyone has found this thread because of the same problem, a note: choose file format “Turtle (.ttl)” from the drop-down menu, but keep the “.n3” file suffix for the File URL input.

Yes, I appreciate the clarification. Note that the import process will be improved in the next version of Omeka.