LISTSERV mailing list manager LISTSERV 16.0

Help for CHRONAM-USERS Archives


CHRONAM-USERS Archives

CHRONAM-USERS Archives


CHRONAM-USERS@LISTSERV.LOC.GOV


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CHRONAM-USERS Home

CHRONAM-USERS Home

CHRONAM-USERS  May 2013

CHRONAM-USERS May 2013

Subject:

Bug in language section

From:

Michael Beccaria <[log in to unmask]>

Reply-To:

Data, API, website, and code of the Chronicling America website" <[log in to unmask]>

Date:

Fri, 10 May 2013 15:54:09 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (61 lines)

When loading a batch using the most recent software from Git on Ubuntu I kept getting an error about "language matching query does not exist." (see the paste below).  When I added a field in the mysql database for "eng" I then got a solr error saying the required field wasn't found. So, I think this is because language is a required field in the schema.xml for solr AND because there is no default value of "eng" or English found in the mysql language database table when you initially are installing the software. I got it working by adding an "eng" field in mysql and by making the language value optional in the schema.xml. I don't know if this will cause problems down the road, but thought I would mention that it is an issue.

Hope that helps

Batch_loader.py
Starting line: 428
for lang, text in lang_text.iteritems():
            try: 
                language = models.Language.objects.get(Q(code=lang) | Q(lingvoj__iendswith=lang)) 
            except models.Language.DoesNotExist:
                # default to english as per requirement 
                language = models.Language.objects.get(code='eng')  
            ocr.language_texts.create(language=language, 
                                      text=text)
        page.ocr = ocr

Here's the output from my batch load before I changed the solr field to optional and added the "eng" field to mysql:

(ENV)ubuntu@ip-10-119-97-242:/opt/chronam/data$ django-admin.py load_batch /opt/chronam/data/batches/batch_vi_affirmed_ver01
INFO:root:loading batch at /opt/chronam/data/batches/batch_vi_affirmed_ver01
INFO:chronam.core.batch_loader:loading batch: batch_vi_affirmed_ver01
INFO:rdflib:version: 3.4.0
INFO:chronam.core.views.image:NativeImage backend '%s' not available.
INFO:chronam.core.views.image:NativeImage backend '%s' not available.
INFO:chronam.core.views.image:Using NativeImage backend 'graphicsmagick'
INFO:chronam.core.batch_loader:Assigned page sequence: 1
INFO:chronam.core.batch_loader:Saving page. issue date: 1886-07-17 00:00:00, page sequence: 1
ERROR:chronam.core.batch_loader:unable to load batch: Language matching query does not exist.
ERROR:chronam.core.batch_loader:Language matching query does not exist.
Traceback (most recent call last):
  File "/opt/chronam/core/batch_loader.py", line 166, in load_batch
    issue = self._load_issue(mets_url)
  File "/opt/chronam/core/batch_loader.py", line 283, in _load_issue
    page = self._load_page(doc, page_div, issue)
  File "/opt/chronam/core/batch_loader.py", line 405, in _load_page
    self.process_ocr(page)
  File "/opt/chronam/core/batch_loader.py", line 433, in process_ocr
    language = models.Language.objects.get(code='eng')
  File "/opt/chronam/ENV/local/lib/python2.7/site-packages/django/db/models/manager.py", line 131, in get
    return self.get_query_set().get(*args, **kwargs)
  File "/opt/chronam/ENV/local/lib/python2.7/site-packages/django/db/models/query.py", line 366, in get
    % self.model._meta.object_name)
DoesNotExist: Language matching query does not exist.
WARNING:root:no OcrDump to delete for batch_vi_affirmed_ver01 (Library of Virginia; Richmond, VA)
ERROR:chronam.core.management.commands.load_batch:unable to load batch: Language matching query does not exist.
Traceback (most recent call last):
  File "/opt/chronam/core/management/commands/load_batch.py", line 39, in handle
    batch = loader.load_batch(batch_name)
  File "/opt/chronam/core/batch_loader.py", line 195, in load_batch
    raise BatchLoaderException(msg)
BatchLoaderException: unable to load batch: Language matching query does not exist.
Error: unable to load batch. check the load_batch log for clues

Mike Beccaria
Systems Librarian
Head of Digital Initiative
Paul Smith's College
518.327.6376
[log in to unmask]
Become a friend of Paul Smith's Library on Facebook today!

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

July 2019
June 2019
April 2019
March 2019
February 2019
October 2018
August 2018
July 2018
June 2018
May 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
May 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
March 2015
January 2015
November 2014
October 2014
September 2014
June 2014
May 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
February 2013

ATOM RSS1 RSS2



LISTSERV.LOC.GOV

CataList Email List Search Powered by the LISTSERV Email List Manager