openeventdata / mordecai

Full text geoparsing as a Python library
MIT License
737 stars 97 forks source link

Error when instantiating Geoparser #102

Open tze-min opened 2 years ago

tze-min commented 2 years ago

Hello! I was working through the installation steps when I ran into a problem with geo = Geoparser(). It isn't able to establish a connection with elasticsearch, though Docker Desktop tells me elasticsearch:5.5.2 is running, and I'm not really sure what's wrong. I would appreciate any help.

The error message is as below.

GET http://localhost:9200/geonames/_count [status:404 request:2.155s]
---------------------------------------------------------------------------
NotFoundError                             Traceback (most recent call last)
~\Documents\myfolder\my-env\lib\site-packages\mordecai\geoparse.py in __init__(self, nlp, es_hosts, es_port, es_ssl, es_auth, verbose, country_threshold, threads, progress, training, models_path, **kwargs)
     70             # with nostderr():
---> 71             self.conn.count()
     72         except:

~\Documents\myfolder\my-env\lib\site-packages\elasticsearch_dsl\search.py in count(self)
    582         # TODO: failed shards detection
--> 583         return es.count(
    584             index=self._index,

~\Documents\myfolder\my-env\lib\site-packages\elasticsearch\client\utils.py in _wrapped(*args, **kwargs)
     72                     params[p] = kwargs.pop(p)
---> 73             return func(*args, params=params, **kwargs)
     74         return _wrapped

~\Documents\myfolder\my-env\lib\site-packages\elasticsearch\client\__init__.py in count(self, index, doc_type, body, params)
   1121 
-> 1122         return self.transport.perform_request('GET', _make_path(index,
   1123             doc_type, '_count'), params=params, body=body)

~\Documents\myfolder\my-env\lib\site-packages\elasticsearch\transport.py in perform_request(self, method, url, params, body)
    311             try:
--> 312                 status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
    313 

~\Documents\myfolder\my-env\lib\site-packages\elasticsearch\connection\http_urllib3.py in perform_request(self, method, url, params, body, timeout, ignore)
    127             self.log_request_fail(method, full_url, url, body, duration, response.status, raw_data)
--> 128             self._raise_error(response.status, raw_data)
    129 

~\Documents\myfolder\my-env\lib\site-packages\elasticsearch\connection\base.py in _raise_error(self, status_code, raw_data)
    124 
--> 125         raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
    126 

NotFoundError: TransportError(404, 'index_not_found_exception', 'no such index')

During handling of the above exception, another exception occurred:

ConnectionError                           Traceback (most recent call last)
    [... skipping hidden 1 frame]

~\AppData\Local\Temp/ipykernel_16648/983768000.py in <module>
----> 1 geo = Geoparser()

~\Documents\myfolder\my-env\lib\site-packages\mordecai\geoparse.py in __init__(self, nlp, es_hosts, es_port, es_ssl, es_auth, verbose, country_threshold, threads, progress, training, models_path, **kwargs)
     72         except:
---> 73             raise ConnectionError("""Could not establish contact with Elasticsearch at {0} on port {1}.
     74 Are you sure it's running?

<class 'str'>: (<class 'IndexError'>, IndexError('tuple index out of range'))

During handling of the above exception, another exception occurred:

IndexError                                Traceback (most recent call last)
    [... skipping hidden 1 frame]

~\Documents\myfolder\my-env\lib\site-packages\IPython\core\interactiveshell.py in showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code)
   2064                                             value, tb, tb_offset=tb_offset)
   2065 
-> 2066                     self._showtraceback(etype, value, stb)
   2067                     if self.call_pdb:
   2068                         # drop into debugger

~\Documents\myfolder\my-env\lib\site-packages\ipykernel\zmqshell.py in _showtraceback(self, etype, evalue, stb)
    540             'traceback' : stb,
    541             'ename' : str(etype.__name__),
--> 542             'evalue' : str(evalue),
    543         }
    544 

~\Documents\myfolder\my-env\lib\site-packages\elasticsearch\exceptions.py in __str__(self)
     67     def __str__(self):
     68         return 'ConnectionError(%s) caused by: %s(%s)' % (
---> 69             self.error, self.info.__class__.__name__, self.info)
     70 
     71 

~\Documents\myfolder\my-env\lib\site-packages\elasticsearch\exceptions.py in error(self)
     42     def error(self):
     43         """ A string error message. """
---> 44         return self.args[1]
     45 
     46     @property

IndexError: tuple index out of range
borilibrarian commented 2 years ago

I am having a similar issue, this seems to be some form of network problem. In my case, docker runs ok with elasticsearch and then when I try geoparse I get a connection error. I have switched online networks to no avail; I don't have a firewall up and am using a Mac. I have used the suggested code to run docker etc.

> GET http://localhost:9200/geonames/_count [status:N/A request:0.618s]
> Traceback (most recent call last):
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
>     chunked=chunked)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
>     six.raise_from(e, None)
>   File "<string>", line 2, in raise_from
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
>     httplib_response = conn.getresponse()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 1336, in getresponse
>     response.begin()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 306, in begin
>     version, status, reason = self._read_status()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 275, in _read_status
>     raise RemoteDisconnected("Remote end closed connection without"
> http.client.RemoteDisconnected: Remote end closed connection without response
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "/opt/anaconda3/lib/python3.7/site-packages/elasticsearch/connection/http_urllib3.py", line 114, in perform_request
>     response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
>     _stacktrace=sys.exc_info()[2])
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py", line 344, in increment
>     raise six.reraise(type(error), error, _stacktrace)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py", line 685, in reraise
>     raise value.with_traceback(tb)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
>     chunked=chunked)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
>     six.raise_from(e, None)
>   File "<string>", line 2, in raise_from
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
>     httplib_response = conn.getresponse()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 1336, in getresponse
>     response.begin()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 306, in begin
>     version, status, reason = self._read_status()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 275, in _read_status
>     raise RemoteDisconnected("Remote end closed connection without"
> urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
> GET http://localhost:9200/geonames/_count [status:N/A request:0.333s]
> Traceback (most recent call last):
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
>     chunked=chunked)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
>     six.raise_from(e, None)
>   File "<string>", line 2, in raise_from
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
>     httplib_response = conn.getresponse()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 1336, in getresponse
>     response.begin()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 306, in begin
>     version, status, reason = self._read_status()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 275, in _read_status
>     raise RemoteDisconnected("Remote end closed connection without"
> http.client.RemoteDisconnected: Remote end closed connection without response
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "/opt/anaconda3/lib/python3.7/site-packages/elasticsearch/connection/http_urllib3.py", line 114, in perform_request
>     response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
>     _stacktrace=sys.exc_info()[2])
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py", line 344, in increment
>     raise six.reraise(type(error), error, _stacktrace)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py", line 685, in reraise
>     raise value.with_traceback(tb)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
>     chunked=chunked)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
>     six.raise_from(e, None)
>   File "<string>", line 2, in raise_from
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
>     httplib_response = conn.getresponse()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 1336, in getresponse
>     response.begin()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 306, in begin
>     version, status, reason = self._read_status()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 275, in _read_status
>     raise RemoteDisconnected("Remote end closed connection without"
> urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
> GET http://localhost:9200/geonames/_count [status:N/A request:0.217s]
> Traceback (most recent call last):
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
>     chunked=chunked)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
>     six.raise_from(e, None)
>   File "<string>", line 2, in raise_from
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
>     httplib_response = conn.getresponse()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 1336, in getresponse
>     response.begin()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 306, in begin
>     version, status, reason = self._read_status()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 275, in _read_status
>     raise RemoteDisconnected("Remote end closed connection without"
> http.client.RemoteDisconnected: Remote end closed connection without response
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "/opt/anaconda3/lib/python3.7/site-packages/elasticsearch/connection/http_urllib3.py", line 114, in perform_request
>     response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
>     _stacktrace=sys.exc_info()[2])
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py", line 344, in increment
>     raise six.reraise(type(error), error, _stacktrace)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py", line 685, in reraise
>     raise value.with_traceback(tb)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
>     chunked=chunked)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
>     six.raise_from(e, None)
>   File "<string>", line 2, in raise_from
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
>     httplib_response = conn.getresponse()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 1336, in getresponse
>     response.begin()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 306, in begin
>     version, status, reason = self._read_status()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 275, in _read_status
>     raise RemoteDisconnected("Remote end closed connection without"
> urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
> GET http://localhost:9200/geonames/_count [status:N/A request:0.514s]
> Traceback (most recent call last):
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
>     chunked=chunked)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
>     six.raise_from(e, None)
>   File "<string>", line 2, in raise_from
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
>     httplib_response = conn.getresponse()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 1336, in getresponse
>     response.begin()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 306, in begin
>     version, status, reason = self._read_status()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 275, in _read_status
>     raise RemoteDisconnected("Remote end closed connection without"
> http.client.RemoteDisconnected: Remote end closed connection without response
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "/opt/anaconda3/lib/python3.7/site-packages/elasticsearch/connection/http_urllib3.py", line 114, in perform_request
>     response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
>     _stacktrace=sys.exc_info()[2])
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py", line 344, in increment
>     raise six.reraise(type(error), error, _stacktrace)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py", line 685, in reraise
>     raise value.with_traceback(tb)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
>     chunked=chunked)
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
>     six.raise_from(e, None)
>   File "<string>", line 2, in raise_from
>   File "/opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
>     httplib_response = conn.getresponse()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 1336, in getresponse
>     response.begin()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 306, in begin
>     version, status, reason = self._read_status()
>   File "/opt/anaconda3/lib/python3.7/http/client.py", line 275, in _read_status
>     raise RemoteDisconnected("Remote end closed connection without"
> urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
> 
> ---------------------------------------------------------------------------
> RemoteDisconnected                        Traceback (most recent call last)
> /opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
>     599                                                   body=body, headers=headers,
> --> 600                                                   chunked=chunked)
>     601 
> 
> /opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
>     383                     # otherwise it looks like a programming error was the cause.
> --> 384                     six.raise_from(e, None)
>     385         except (SocketTimeout, BaseSSLError, SocketError) as e:
> 
> /opt/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py in raise_from(value, from_value)
> 
> /opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
>     379                 try:
> --> 380                     httplib_response = conn.getresponse()
>     381                 except Exception as e:
> 
> /opt/anaconda3/lib/python3.7/http/client.py in getresponse(self)
>    1335             try:
> -> 1336                 response.begin()
>    1337             except ConnectionError:
> 
> /opt/anaconda3/lib/python3.7/http/client.py in begin(self)
>     305         while True:
> --> 306             version, status, reason = self._read_status()
>     307             if status != CONTINUE:
> 
> /opt/anaconda3/lib/python3.7/http/client.py in _read_status(self)
>     274             # sending a valid response.
> --> 275             raise RemoteDisconnected("Remote end closed connection without"
>     276                                      " response")
> 
> RemoteDisconnected: Remote end closed connection without response
> 
> During handling of the above exception, another exception occurred:
> 
> ProtocolError                             Traceback (most recent call last)
> /opt/anaconda3/lib/python3.7/site-packages/elasticsearch/connection/http_urllib3.py in perform_request(self, method, url, params, body, timeout, ignore)
>     113 
> --> 114             response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
>     115             duration = time.time() - start
> 
> /opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
>     637             retries = retries.increment(method, url, error=e, _pool=self,
> --> 638                                         _stacktrace=sys.exc_info()[2])
>     639             retries.sleep()
> 
> /opt/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace)
>     343             # Disabled, indicate to re-raise the error.
> --> 344             raise six.reraise(type(error), error, _stacktrace)
>     345 
> 
> /opt/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py in reraise(tp, value, tb)
>     684         if value.__traceback__ is not tb:
> --> 685             raise value.with_traceback(tb)
>     686         raise value
> 
> /opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
>     599                                                   body=body, headers=headers,
> --> 600                                                   chunked=chunked)
>     601 
> 
> /opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
>     383                     # otherwise it looks like a programming error was the cause.
> --> 384                     six.raise_from(e, None)
>     385         except (SocketTimeout, BaseSSLError, SocketError) as e:
> 
> /opt/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py in raise_from(value, from_value)
> 
> /opt/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
>     379                 try:
> --> 380                     httplib_response = conn.getresponse()
>     381                 except Exception as e:
> 
> /opt/anaconda3/lib/python3.7/http/client.py in getresponse(self)
>    1335             try:
> -> 1336                 response.begin()
>    1337             except ConnectionError:
> 
> /opt/anaconda3/lib/python3.7/http/client.py in begin(self)
>     305         while True:
> --> 306             version, status, reason = self._read_status()
>     307             if status != CONTINUE:
> 
> /opt/anaconda3/lib/python3.7/http/client.py in _read_status(self)
>     274             # sending a valid response.
> --> 275             raise RemoteDisconnected("Remote end closed connection without"
>     276                                      " response")
> 
> ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
> 
> During handling of the above exception, another exception occurred:
> 
> ConnectionError                           Traceback (most recent call last)
> /opt/anaconda3/lib/python3.7/site-packages/mordecai/geoparse.py in __init__(self, nlp, es_hosts, es_port, es_ssl, es_auth, verbose, country_threshold, threads, progress, training, models_path, **kwargs)
>      70             # with nostderr():
> ---> 71             self.conn.count()
>      72         except:
> 
> /opt/anaconda3/lib/python3.7/site-packages/elasticsearch_dsl/search.py in count(self)
>     586             body=d,
> --> 587             **self._params
>     588         )['count']
> 
> /opt/anaconda3/lib/python3.7/site-packages/elasticsearch/client/utils.py in _wrapped(*args, **kwargs)
>      72                     params[p] = kwargs.pop(p)
> ---> 73             return func(*args, params=params, **kwargs)
>      74         return _wrapped
> 
> /opt/anaconda3/lib/python3.7/site-packages/elasticsearch/client/__init__.py in count(self, index, doc_type, body, params)
>    1122         return self.transport.perform_request('GET', _make_path(index,
> -> 1123             doc_type, '_count'), params=params, body=body)
>    1124 
> 
> /opt/anaconda3/lib/python3.7/site-packages/elasticsearch/transport.py in perform_request(self, method, url, params, body)
>     311             try:
> --> 312                 status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
>     313 
> 
> /opt/anaconda3/lib/python3.7/site-packages/elasticsearch/connection/http_urllib3.py in perform_request(self, method, url, params, body, timeout, ignore)
>     122                 raise ConnectionTimeout('TIMEOUT', str(e), e)
> --> 123             raise ConnectionError('N/A', str(e), e)
>     124 
> 
> ConnectionError: ConnectionError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))) caused by: ProtocolError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
> 
> During handling of the above exception, another exception occurred:
> 
> ConnectionError                           Traceback (most recent call last)
> /opt/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_code(self, code_obj, result, async_)
>    3325                 else:
> -> 3326                     exec(code_obj, self.user_global_ns, self.user_ns)
>    3327             finally:
> 
> <ipython-input-18-e748618d2018> in <module>
> ----> 1 geo = Geoparser()
>       2 test_result = geo.geoparse(test_string)
>       3 print(test_result)
> 
> /opt/anaconda3/lib/python3.7/site-packages/mordecai/geoparse.py in __init__(self, nlp, es_hosts, es_port, es_ssl, es_auth, verbose, country_threshold, threads, progress, training, models_path, **kwargs)
>      76 See https://github.com/openeventdata/mordecai#installation-and-requirements
> ---> 77 for instructions on setting up Geonames/Elasticsearch""".format(es_hosts, es_port))
>      78         es_date = utilities.check_geonames_date(self.conn)
> 
> <class 'str'>: (<class 'IndexError'>, IndexError('tuple index out of range'))
> 
> During handling of the above exception, another exception occurred:
> 
> IndexError                                Traceback (most recent call last)
> /opt/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_code(self, code_obj, result, async_)
>    3341             if result is not None:
>    3342                 result.error_in_exec = sys.exc_info()[1]
> -> 3343             self.showtraceback(running_compiled_code=True)
>    3344         else:
>    3345             outflag = False
> 
> /opt/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py in showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code)
>    2043                                             value, tb, tb_offset=tb_offset)
>    2044 
> -> 2045                     self._showtraceback(etype, value, stb)
>    2046                     if self.call_pdb:
>    2047                         # drop into debugger
> 
> /opt/anaconda3/lib/python3.7/site-packages/ipykernel/zmqshell.py in _showtraceback(self, etype, evalue, stb)
>     544             u'traceback' : stb,
>     545             u'ename' : unicode_type(etype.__name__),
> --> 546             u'evalue' : py3compat.safe_unicode(evalue),
>     547         }
>     548 
> 
> /opt/anaconda3/lib/python3.7/site-packages/ipython_genutils/py3compat.py in safe_unicode(e)
>      63     """
>      64     try:
> ---> 65         return unicode_type(e)
>      66     except UnicodeError:
>      67         pass
> 
> /opt/anaconda3/lib/python3.7/site-packages/elasticsearch/exceptions.py in __str__(self)
>      67     def __str__(self):
>      68         return 'ConnectionError(%s) caused by: %s(%s)' % (
> ---> 69             self.error, self.info.__class__.__name__, self.info)
>      70 
>      71 
> 
> /opt/anaconda3/lib/python3.7/site-packages/elasticsearch/exceptions.py in error(self)
>      42     def error(self):
>      43         """ A string error message. """
> ---> 44         return self.args[1]
>      45 
>      46     @property
> 
> IndexError: tuple index out of range
> 
> 
trungams commented 2 years ago

I'm having a similar issue on MacOS. Seems like the docker container crashed just after a few requests I made with curl

trungv12 commented 2 years ago

Seems like this issue is specific to MacOS. I didn't encounter it when trying out mordecai on Ubuntu.

tze-min commented 2 years ago

To update, I'd opened the issue those months back because I'd encountered the problem on my Windows 10 PC, but I remember I'd resolved it by connecting to a more stable Internet network. I can't comment on why it's not working on MacOS though.

borilibrarian commented 2 years ago

Thanks, I will see what I can do!

On Sun, Nov 28, 2021 at 10:03 AM Tze Min @.***> wrote:

To update, I'd opened the issue those months back because I'd encountered the problem on my Windows 10 PC, but I remember I'd resolved it by connecting to a more stable Internet network. I can't comment on why it's not working on MacOS though.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openeventdata/mordecai/issues/102#issuecomment-981100634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQAAQBGREGU4NOEAJJEVO7TUOJAF3ANCNFSM5CGCXDCQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.