rhsimplex / image-match

🎇 Quickly search over billions of images
2.94k stars 405 forks source link

TypeError: super(type, obj): obj must be an instance or subtype of type #122

Closed francescolorussi closed 5 years ago

francescolorussi commented 5 years ago

I've installed image-match with requirement 'elasticsearch>=6.0.0,<7.0.0', as I got the same error as in issue #88 . Now what I get is:

`from elasticsearch import Elasticsearch from image_match.elasticsearch_driver import SignatureES

es = Elasticsearch() ses = SignatureES(es)

ses.add_image('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg') ses.add_image('https://pixabay.com/static/uploads/photo/2012/11/28/08/56/mona-lisa-67506_960_720.jpg') ses.addimage('https://upload.wikimedia.org/wikipedia/commons/e/e0/Caravaggio-_Cena_in_Emmaus.jpg') ses.add_image('https://c2.staticflickr.com/8/7158/6814444991_08d82de57e_z.jpg')`

`Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/FRANCESCO/Desktop/elastictest.py', wdir='C:/Users/FRANCESCO/Desktop')

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 668, in runfile execfile(filename, namespace)

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/FRANCESCO/Desktop/elastictest.py", line 11, in es = Elasticsearch()

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\elasticsearch\client__init.py", line 192, in init__ self.transport = transport_class(_normalize_hosts(hosts), **kwargs)

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\elasticsearch\transport.py", line 127, in init self.set_connections(hosts)

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\elasticsearch\transport.py", line 177, in set_connections connections = list(zip(connections, hosts))

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\elasticsearch\transport.py", line 173, in _create_connection return self.connection_class(**kwargs)

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\elasticsearch\connection\http_urllib3.py", line 96, in init super(Urllib3HttpConnection, self).init(

TypeError: super(type, obj): obj must be an instance or subtype of type

runfile('C:/Users/FRANCESCO/Desktop/elastictest.py', wdir='C:/Users/FRANCESCO/Desktop') Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/FRANCESCO/Desktop/elastictest.py', wdir='C:/Users/FRANCESCO/Desktop')

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 668, in runfile execfile(filename, namespace)

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/FRANCESCO/Desktop/elastictest.py", line 11, in es = Elasticsearch()

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\elasticsearch\client__init.py", line 192, in init__ self.transport = transport_class(_normalize_hosts(hosts), **kwargs)

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\elasticsearch\transport.py", line 127, in init self.set_connections(hosts)

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\elasticsearch\transport.py", line 177, in set_connections connections = list(zip(connections, hosts))

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\elasticsearch\transport.py", line 173, in _create_connection return self.connection_class(**kwargs)

File "C:\Python36\python-3.6.6.amd64\lib\site-packages\elasticsearch\connection\http_urllib3.py", line 96, in init super(Urllib3HttpConnection, self).init(

TypeError: super(type, obj): obj must be an instance or subtype of type`