{"action":"created","issue":{"url":"https://api.github.com/repos/OpenPhilology/nidaba/issues/6","labels_url":"https://api.github.com/repos/OpenPhilology/nidaba/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/OpenPhilology/nidaba/issues/6/comments","events_url":"https://api.github.com/repos/OpenPhilology/nidaba/issues/6/events","html_url":"https://github.com/OpenPhilology/nidaba/issues/6","id":100785814,"number":6,"title":"Errors with Kraken","user":{"login":"sonofmun","id":3787067,"avatar_url":"https://avatars.githubusercontent.com/u/3787067?v=3","gravatar_id":"","url":"https://api.github.com/users/sonofmun","html_url":"https://github.com/sonofmun","followers_url":"https://api.github.com/users/sonofmun/followers","following_url":"https://api.github.com/users/sonofmun/following{/other_user}","gists_url":"https://api.github.com/users/sonofmun/gists{/gist_id}","starred_url":"https://api.github.com/users/sonofmun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonofmun/subscriptions","organizations_url":"https://api.github.com/users/sonofmun/orgs","repos_url":"https://api.github.com/users/sonofmun/repos","events_url":"https://api.github.com/users/sonofmun/events{/privacy}","received_events_url":"https://api.github.com/users/sonofmun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-13T14:38:35Z","updated_at":"2015-08-14T11:09:08Z","closed_at":null,"body":"When I use the following command:\r\n\r\n    nidaba batch -b otsu -l tesseract -o kraken:grc_teubner -p spell_check:polytonic_greek -- /cluster/tufts/perseus_ocr/nidaba/teubner/ammonius_1966/*.tif\r\n\r\nI get the following error showing up in the celery log for every page, i.e., every page fails with the same error\r\n\r\n```\r\n[2015-08-13 10:32:52,073: ERROR/MainProcess] Task nidaba.ocr.kraken[00db4d89-a411-4098-9036-9865acabe112] raised unexpected: AttributeError(\"'NoneType' object has no attribute 'predictString'\",)\r\nTraceback (most recent call last):\r\n  File \"/cluster/home/mmunso01/envs/nidaba/lib/python2.7/site-packages/celery/app/trace.py\", line 240, in trace_task\r\n    R = retval = fun(*args, **kwargs)\r\n  File \"/cluster/home/mmunso01/envs/nidaba/lib/python2.7/site-packages/nidaba/tasks/helper.py\", line 81, in __call__\r\n    ret = super(NidabaTask, self).__call__(*args, **nkwargs)\r\n  File \"/cluster/home/mmunso01/envs/nidaba/lib/python2.7/site-packages/celery/app/trace.py\", line 438, in __protected_call__\r\n    return self.run(*args, **kwargs)\r\n  File \"/cluster/home/mmunso01/envs/nidaba/lib/python2.7/site-packages/nidaba/plugins/kraken.py\", line 123, in ocr_kraken\r\n    for rec in rpred.rpred(rnn, img, [(int(x[0]), int(x[1]), int(x[2]), int(x[3])) for x in lines]):\r\n  File \"/cluster/home/mmunso01/envs/nidaba/lib/python2.7/site-packages/kraken/rpred.py\", line 132, in rpred\r\n    pred = network.predictString(line)\r\nAttributeError: 'NoneType' object has no attribute 'predictString'\r\n```\r\n\r\nnidaba.yaml looks like this:\r\n\r\n```\r\n# The home directory for Iris to store files created by OCR jobs. For example,\r\n# tifs, jp2s, meta.xml, and abbyy file downloaded from archive.org are stored\r\n# here. Each new job is automatically placed in a uniquely named directory.\r\nstorage_path: /cluster/tufts/perseus_ocr/nidaba/OCR/\r\n\r\n# URL to the redis database. May be shared with celery.\r\nredis_url: 'redis://127.0.0.1:6379'\r\n\r\n# Spell check configuration. Dictionaries are kept on the common medium (i.e.\r\n# at STORAGE_PATH/tuple[0]/tuple[1]). Each spell checker requires a list of\r\n# valid words ('dictionary') and a dictionary containing all variants of words\r\n# attained by deletion of single characters (see nidaba.lex.make_deldict).\r\nlang_dicts:\r\n  polytonic_greek: {dictionary: [dicts, greek.dic],\r\n                    deletion_dictionary: [dicts, del_greek.dic]}\r\n  latin: {dictionary: [dicts, latin.dic],\r\n                    deletion_dictionary: [dicts, del_latin.dic]}\r\n\r\n# Ocropus/kraken models\r\nocropus_models:\r\n  greek: [models, omnibus-2014-05-31-10-16-00087000.pyrnn.gz]\r\n  grc_teubner: [models, teubner-serif-2013-12-16-11-26-00067000.pyrnn.gz]\r\n  atlantean: [models, atlantean.pyrnn.gz]\r\n  fraktur: [models, fraktur.pyrnn.gz]\r\n  fancy_ligatures: [models, ligatures.pyrnn.gz]\r\n\r\n# Models solely working with kraken (i.e. models in HDF5 format).\r\nkraken_models:\r\n  default: [models, en-default.hdf5]\r\n\r\n\r\n# List of plugins to load. Additional fields in the associative array will be\r\n# handed over to the setup function of the plugin.  Be aware that plugins\r\n# utilizing external components that aren't installed will cause nidaba to\r\n# abort. \r\nplugins_load:\r\n  tesseract: {implementation: capi, # set to either legacy (hOCR\r\n                                              # output in an *.html file),\r\n                                              # direct (hOCR output in an\r\n                                              # *.hocr file), or capi\r\n                                              # (tesseract version >= 3.02)\r\n             tessdata: /cluster/tufts/perseus_ocr_code/tesseract/tessdata} # location of the tessdata\r\n                                                 # path. May also be a storage\r\n                                                 # tuple.\r\n  #ocropus: {}\r\n  kraken: {}\r\n  #leptonica: {}\r\n```"},"comment":{"url":"https://api.github.com/repos/OpenPhilology/nidaba/issues/comments/131079134","html_url":"https://github.com/OpenPhilology/nidaba/issues/6#issuecomment-131079134","issue_url":"https://api.github.com/repos/OpenPhilology/nidaba/issues/6","id":131079134,"user":{"login":"mittagessen","id":3780295,"avatar_url":"https://avatars.githubusercontent.com/u/3780295?v=3","gravatar_id":"","url":"https://api.github.com/users/mittagessen","html_url":"https://github.com/mittagessen","followers_url":"https://api.github.com/users/mittagessen/followers","following_url":"https://api.github.com/users/mittagessen/following{/other_user}","gists_url":"https://api.github.com/users/mittagessen/gists{/gist_id}","starred_url":"https://api.github.com/users/mittagessen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mittagessen/subscriptions","organizations_url":"https://api.github.com/users/mittagessen/orgs","repos_url":"https://api.github.com/users/mittagessen/repos","events_url":"https://api.github.com/users/mittagessen/events{/privacy}","received_events_url":"https://api.github.com/users/mittagessen/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T11:09:08Z","updated_at":"2015-08-14T11:09:08Z","body":"I downloaded them myself yesterday and they work like a charm on my system here. Could you bump up the kraken to 0.4.6 using pip and record the error output? Alternatively you could try running kraken manually:\r\n\r\n    kraken segment img.png lines.txt\r\n    kraken ocr -m /path/to/model --lines lines.txt img.png\r\n\r\nand see if that works."}}