Open einali opened 7 years ago
Hi @einali
I haven't maintained the MongoDB portion of the code, it's mostly there as an example at this point. Is there some reason you can't use the Elasticsearch backend?
Hi everyone.
I've also met the same problem. It's just convenient to have an ability to use mongo backend. We have several mongo clusters in our project and it'd be cool to add a new one instead of using elastic for that single task.
Hi @phoenix-mstu I solved this problem by simply comment "from multiprocessing.managers import Queue as managerQueue" and replace managerQueue.Queue() with Queue().
for import
`from pymongo.mongo_client import MongoClient
from os import listdir from os.path import isfile, join from image_match.goldberg import ImageSignature from image_match.signature_database_base import make_record from image_match.mongodb_driver import SignatureMongo`
there is this error:
Traceback (most recent call last): File "/home/mehdi/ws/temp/image_match/src/sample3.py", line 7, in <module> from image_match.mongodb_driver import SignatureMongo File "/home/mehdi/venvs/image_match/lib/python3.5/site-packages/image_match/mongodb_driver.py", line 1, in <module> from signature_database_base import SignatureDatabaseBase ImportError: No module named 'signature_database_base'
in file image_match/mongodb_driver.py
changing
from signature_database_base import SignatureDatabaseBase from signature_database_base import normalized_distance from multiprocessing import cpu_count, Process, Queue from multiprocessing.managers import Queue as managerQueue import numpy as np
to
from .signature_database_base import SignatureDatabaseBase from .signature_database_base import normalized_distance from multiprocessing import cpu_count, Process, Queue from multiprocessing.managers import Queue as managerQueue import numpy as np
other error occurs :
Traceback (most recent call last): File "/home/mehdi/ws/temp/image_match/src/sample3.py", line 7, in <module> from image_match.mongodb_driver import SignatureMongo File "/home/mehdi/venvs/image_match/lib/python3.5/site-packages/image_match/mongodb_driver.py", line 4, in <module> from multiprocessing.managers import Queue as managerQueue ImportError: cannot import name 'Queue'