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-

and the error displayed is:
<InvalidArgumentException: $value cannot have both and language and a datatype in /home/grenadev/
Stack trace:
#0 /home/grenadev/ EasyRdf\Graph->checkValueParam(Array)
#1 /home/grenadev/ EasyRdf\Graph->add(‘http://id.loc.g…’, ‘http://www.w3.o…’, Array)
#2 /home/grenadev/ EasyRdf\Parser->addTriple(Object(EasyRdf\ParsedUri), ‘http://www.w3.o…’, Array)
#3 /home/grenadev/ EasyRdf\Parser\RdfXml->add(Object(EasyRdf\ParsedUri), ‘http://www.w3.o…’, ‘’, ‘uri’, ‘literal’, ‘http://www.w3.o…’, ‘en’)
#4 /home/grenadev/ 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/ xml_parse(Resource id #731, ‘<rdf:RDF xmlns:…’, true)
#7 /home/grenadev/ EasyRdf\Parser\RdfXml->parse(Object(EasyRdf\Graph), ‘<rdf:RDF xmlns:…’, Object(EasyRdf\Format), ‘http://id.loc.g…’)
#8 /home/grenadev/ EasyRdf\Graph->parse(‘<rdf:RDF xmlns:…’, Object(EasyRdf\Format), ‘http://id.loc.g…’)
#9 /home/grenadev/ EasyRdf\Graph->load(‘http://id.loc.g…’, ‘application/rdf…’)
#10 /home/grenadev/ Omeka\Stdlib\RdfImporter->getMembers(‘url’, ‘http://id.loc.g…’, Array)
#11 /home/grenadev/ Omeka\Stdlib\RdfImporter->import(‘url’, Array, Array)
#12 /home/grenadev/ Omeka\Controller\Admin\VocabularyController->importAction()
#13 /home/grenadev/ Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#14 /home/grenadev/ Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#15 /home/grenadev/ Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#16 /home/grenadev/ Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#17 /home/grenadev/ Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
#18 /home/grenadev/ Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#19 /home/grenadev/ Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#20 /home/grenadev/ Laminas\Mvc\Application->run()
#21 {main}>

Any help or insight is greatly appreciated! Thank you.

This worked for me:

  • Label: MARC Relator
  • Namespace URI:
  • Namespace prefix: mrel
  • Import type: URL
  • File URL:
  • 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!

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.