error when getting annotations from the db
Created by: vkhalidov
When executing a script that requests annotations from file objects for different protocols in xbob.db.multipie, I received the following error:
Traceback (most recent call last): File "bin/prepare_multipie.py", line 23, in sys.exit(prepare.multipie.main()) File ".../data_prepare/db/prepare/multipie.py", line 31, in main annot = db.annotations(file_obj.id) File ".../data_prepare/db/eggs/xbob.db.multipie-1.1.1-py2.7.egg/xbob/db/multipie/query.py", line 619, in annotations info("Labels of file '%s' are incomplete"%file_name) NameError: global name 'info' is not defined
The function "info" was not imported properly. Moreover, the name "file_name" from this line is neither defined.
Here's an example to reproduce the error:
def main(): db = xbob.db.multipie.query.Database( original_directory = ORIGINAL_DIR, original_extension = ORIGINAL_EXTENSION, annotation_directory = ANNOTATION_DIR) protocols = ['M', 'U', 'G', 'E'] for protocol in protocols: file_objs = db.objects(protocol) for file_obj in file_objs: annot = db.annotations(file_obj.id)
Best regards, Vasil Khalidov