Traceback (most recent call last):
File "main.py", line 100, in <module>
feature_conf)
File "main.py", line 40, in start_server
pipeline = procpipeline.build(langcodes, feature_config)
File "/Users/pieterb/Documents/semanticize/semanticizer/procpipeline.py", line 41, in build
_load_features(pipeline, langcodes, feature_config)
File "/Users/pieterb/Documents/semanticize/semanticizer/procpipeline.py", line 84, in _load_features
feature_config["picklepath"])))
File "/Users/pieterb/Documents/semanticize/semanticizer/processors/external.py", line 39, in __init__
+ 'article_cache.db')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shelve.py", line 223, in __init__
Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/anydbm.py", line 85, in open
return mod.open(file, flag, mode)
dbm.error: (2, 'No such file or directory')
Cause
In commit 97340c5df84f67f196b6429273299a00d7993960, on line 37-38 of processors/external.py:
Cause
In commit 97340c5df84f67f196b6429273299a00d7993960, on line 37-38 of
processors/external.py
:This fails if the
pickle_root
directory doesn’t exist.Workaround
Create this directory before running the semanticizer:
Solution
In the code, check if the directory exists, and create it if not.