@jmmease Actually, it seems to be an eventlet error. Iām trying to export a simple figure generated by df.iplot()
using cufflinks.
Once I go offline, I get the error
tests\test_plot.py:124 (test_comparison_report[True-True])
name = 'localhost', family = <AddressFamily.AF_INET: 2>, raises = False
_proxy = <eventlet.support.greendns.ResolverProxy object at 0x000001A82B665780>
def resolve(name, family=socket.AF_INET, raises=True, _proxy=None):
"""Resolve a name for a given family using the global resolver proxy.
This method is called by the global getaddrinfo() function.
Return a dns.resolver.Answer instance. If there is no answer it's
rrset will be emtpy.
"""
if family == socket.AF_INET:
rdtype = dns.rdatatype.A
elif family == socket.AF_INET6:
rdtype = dns.rdatatype.AAAA
else:
raise socket.gaierror(socket.EAI_FAMILY,
'Address family not supported')
if _proxy is None:
_proxy = resolver
try:
try:
> return _proxy.query(name, rdtype, raise_on_no_answer=raises)
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\greendns.py:413:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <eventlet.support.greendns.ResolverProxy object at 0x000001A82B665780>
qname = <DNS name localhost>, rdtype = 1, rdclass = 1, tcp = False
source = None, raise_on_no_answer = False, _hosts_rdtypes = (1, 28)
def query(self, qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN,
tcp=False, source=None, raise_on_no_answer=True,
_hosts_rdtypes=(dns.rdatatype.A, dns.rdatatype.AAAA)):
"""Query the resolver, using /etc/hosts if enabled.
Behavior:
1. if hosts is enabled and contains answer, return it now
2. query nameservers for qname
3. if qname did not contain dots, pretend it was top-level domain,
query "foobar." and append to previous result
"""
result = [None, None, 0]
if qname is None:
qname = '0.0.0.0'
if isinstance(qname, six.string_types):
qname = dns.name.from_text(qname, None)
def step(fun, *args, **kwargs):
try:
a = fun(*args, **kwargs)
except Exception as e:
result[1] = e
return False
if a.rrset is not None and len(a.rrset):
if result[0] is None:
result[0] = a
else:
result[0].rrset.union_update(a.rrset)
result[2] += len(a.rrset)
return True
def end():
if result[0] is not None:
if raise_on_no_answer and result[2] == 0:
raise dns.resolver.NoAnswer
return result[0]
if result[1] is not None:
if raise_on_no_answer or not isinstance(result[1], dns.resolver.NoAnswer):
raise result[1]
raise dns.resolver.NXDOMAIN(qnames=(qname,))
if (self._hosts and (rdclass == dns.rdataclass.IN) and (rdtype in _hosts_rdtypes)):
if step(self._hosts.query, qname, rdtype, raise_on_no_answer=False):
if (result[0] is not None) or (result[1] is not None):
return end()
# Main query
step(self._resolver.query, qname, rdtype, rdclass, tcp, source, raise_on_no_answer=False)
# `resolv.conf` docs say unqualified names must resolve from search (or local) domain.
# However, common OS `getaddrinfo()` implementations append trailing dot (e.g. `db -> db.`)
# and ask nameservers, as if top-level domain was queried.
# This step follows established practice.
# https://github.com/nameko/nameko/issues/392
# https://github.com/eventlet/eventlet/issues/363
if len(qname) == 1:
step(self._resolver.query, qname.concatenate(dns.name.root),
rdtype, rdclass, tcp, source, raise_on_no_answer=False)
> return end()
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\greendns.py:371:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def end():
if result[0] is not None:
if raise_on_no_answer and result[2] == 0:
raise dns.resolver.NoAnswer
return result[0]
if result[1] is not None:
if raise_on_no_answer or not isinstance(result[1], dns.resolver.NoAnswer):
> raise result[1]
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\greendns.py:350:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fun = <bound method Resolver.query of <dns.resolver.Resolver object at 0x000001A82B650470>>
args = (<DNS name localhost.>, 1, 1, False, None)
kwargs = {'raise_on_no_answer': False}
def step(fun, *args, **kwargs):
try:
> a = fun(*args, **kwargs)
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\greendns.py:331:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <dns.resolver.Resolver object at 0x000001A82B650470>
qname = <DNS name localhost.>, rdtype = 1, rdclass = 1, tcp = False
source = None, raise_on_no_answer = False, source_port = 0
def query(self, qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN,
tcp=False, source=None, raise_on_no_answer=True, source_port=0):
"""Query nameservers to find the answer to the question.
The I{qname}, I{rdtype}, and I{rdclass} parameters may be objects
of the appropriate type, or strings that can be converted into objects
of the appropriate type. E.g. For I{rdtype} the integer 2 and the
the string 'NS' both mean to query for records with DNS rdata type NS.
@param qname: the query name
@type qname: dns.name.Name object or string
@param rdtype: the query type
@type rdtype: int or string
@param rdclass: the query class
@type rdclass: int or string
@param tcp: use TCP to make the query (default is False).
@type tcp: bool
@param source: bind to this IP address (defaults to machine default
IP).
@type source: IP address in dotted quad notation
@param raise_on_no_answer: raise NoAnswer if there's no answer
(defaults is True).
@type raise_on_no_answer: bool
@param source_port: The port from which to send the message.
The default is 0.
@type source_port: int
@rtype: dns.resolver.Answer instance
@raises Timeout: no answers could be found in the specified lifetime
@raises NXDOMAIN: the query name does not exist
@raises YXDOMAIN: the query name is too long after DNAME substitution
@raises NoAnswer: the response did not contain an answer and
raise_on_no_answer is True.
@raises NoNameservers: no non-broken nameservers are available to
answer the question."""
if isinstance(qname, string_types):
qname = dns.name.from_text(qname, None)
if isinstance(rdtype, string_types):
rdtype = dns.rdatatype.from_text(rdtype)
if dns.rdatatype.is_metatype(rdtype):
raise NoMetaqueries
if isinstance(rdclass, string_types):
rdclass = dns.rdataclass.from_text(rdclass)
if dns.rdataclass.is_metaclass(rdclass):
raise NoMetaqueries
qnames_to_try = []
if qname.is_absolute():
qnames_to_try.append(qname)
else:
if len(qname) > 1:
qnames_to_try.append(qname.concatenate(dns.name.root))
if self.search:
for suffix in self.search:
qnames_to_try.append(qname.concatenate(suffix))
else:
qnames_to_try.append(qname.concatenate(self.domain))
all_nxdomain = True
nxdomain_responses = {}
start = time.time()
_qname = None # make pylint happy
for _qname in qnames_to_try:
if self.cache:
answer = self.cache.get((_qname, rdtype, rdclass))
if answer is not None:
if answer.rrset is None and raise_on_no_answer:
raise NoAnswer(response=answer.response)
else:
return answer
request = dns.message.make_query(_qname, rdtype, rdclass)
if self.keyname is not None:
request.use_tsig(self.keyring, self.keyname,
algorithm=self.keyalgorithm)
request.use_edns(self.edns, self.ednsflags, self.payload)
if self.flags is not None:
request.flags = self.flags
response = None
#
# make a copy of the servers list so we can alter it later.
#
nameservers = self.nameservers[:]
errors = []
if self.rotate:
random.shuffle(nameservers)
backoff = 0.10
while response is None:
if len(nameservers) == 0:
raise NoNameservers(request=request, errors=errors)
for nameserver in nameservers[:]:
timeout = self._compute_timeout(start)
port = self.nameserver_ports.get(nameserver, self.port)
try:
tcp_attempt = tcp
if tcp:
response = dns.query.tcp(request, nameserver,
timeout, port,
source=source,
source_port=source_port)
else:
response = dns.query.udp(request, nameserver,
timeout, port,
source=source,
source_port=source_port)
if response.flags & dns.flags.TC:
# Response truncated; retry with TCP.
tcp_attempt = True
timeout = self._compute_timeout(start)
response = \
dns.query.tcp(request, nameserver,
timeout, port,
source=source,
source_port=source_port)
except (socket.error, dns.exception.Timeout) as ex:
#
# Communication failure or timeout. Go to the
# next server
#
errors.append((nameserver, tcp_attempt, port, ex,
response))
response = None
continue
except dns.query.UnexpectedSource as ex:
#
# Who knows? Keep going.
#
errors.append((nameserver, tcp_attempt, port, ex,
response))
response = None
continue
except dns.exception.FormError as ex:
#
# We don't understand what this server is
# saying. Take it out of the mix and
# continue.
#
nameservers.remove(nameserver)
errors.append((nameserver, tcp_attempt, port, ex,
response))
response = None
continue
except EOFError as ex:
#
# We're using TCP and they hung up on us.
# Probably they don't support TCP (though
# they're supposed to!). Take it out of the
# mix and continue.
#
nameservers.remove(nameserver)
errors.append((nameserver, tcp_attempt, port, ex,
response))
response = None
continue
rcode = response.rcode()
if rcode == dns.rcode.YXDOMAIN:
ex = YXDOMAIN()
errors.append((nameserver, tcp_attempt, port, ex,
response))
raise ex
if rcode == dns.rcode.NOERROR or \
rcode == dns.rcode.NXDOMAIN:
break
#
# We got a response, but we're not happy with the
# rcode in it. Remove the server from the mix if
# the rcode isn't SERVFAIL.
#
if rcode != dns.rcode.SERVFAIL or not self.retry_servfail:
nameservers.remove(nameserver)
errors.append((nameserver, tcp_attempt, port,
dns.rcode.to_text(rcode), response))
response = None
if response is not None:
break
#
# All nameservers failed!
#
if len(nameservers) > 0:
#
# But we still have servers to try. Sleep a bit
# so we don't pound them!
#
> timeout = self._compute_timeout(start)
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\dns\resolver.py:1041:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <dns.resolver.Resolver object at 0x000001A82B650470>
start = 1536673406.3233714
def _compute_timeout(self, start):
now = time.time()
duration = now - start
if duration < 0:
if duration < -1:
# Time going backwards is bad. Just give up.
raise Timeout(timeout=duration)
else:
# Time went backwards, but only a little. This can
# happen, e.g. under vmware with older linux kernels.
# Pretend it didn't happen.
now = start
if duration >= self.lifetime:
> raise Timeout(timeout=duration)
E dns.exception.Timeout: The DNS operation timed out after 30.00040102005005 seconds
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\dns\resolver.py:858: Timeout
During handling of the above exception, another exception occurred:
self = <urllib3.connection.HTTPConnection object at 0x000001A831B78EB8>
def _new_conn(self):
""" Establish a socket connection and set nodelay settings on it.
:return: New socket connection.
"""
extra_kw = {}
if self.source_address:
extra_kw['source_address'] = self.source_address
if self.socket_options:
extra_kw['socket_options'] = self.socket_options
try:
conn = connection.create_connection(
> (self.host, self.port), self.timeout, **extra_kw)
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\urllib3\connection.py:141:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
address = ('localhost', 50796), timeout = None, source_address = None
socket_options = [(6, 1, 1)]
def create_connection(address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
source_address=None, socket_options=None):
"""Connect to *address* and return the socket object.
Convenience function. Connect to *address* (a 2-tuple ``(host,
port)``) and return the socket object. Passing the optional
*timeout* parameter will set the timeout on the socket instance
before attempting to connect. If no *timeout* is supplied, the
global default timeout setting returned by :func:`getdefaulttimeout`
is used. If *source_address* is set it must be a tuple of (host, port)
for the socket to bind as a source address before making the connection.
An host of '' or port 0 tells the OS to use the default.
"""
host, port = address
if host.startswith('['):
host = host.strip('[]')
err = None
# Using the value from allowed_gai_family() in the context of getaddrinfo lets
# us select whether to work with IPv4 DNS records, IPv6 records, or both.
# The original create_connection function always returns all records.
family = allowed_gai_family()
> for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\urllib3\util\connection.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
host = 'localhost', port = 50796, family = <AddressFamily.AF_UNSPEC: 0>
socktype = <SocketKind.SOCK_STREAM: 1>, proto = 0, flags = 0
def getaddrinfo(host, port, family=0, socktype=0, proto=0, flags=0):
"""Replacement for Python's socket.getaddrinfo
This does the A and AAAA lookups asynchronously after which it
calls the OS' getaddrinfo(3) using the AI_NUMERICHOST flag. This
flag ensures getaddrinfo(3) does not use the network itself and
allows us to respect all the other arguments like the native OS.
"""
if isinstance(host, six.string_types):
host = host.encode('idna').decode('ascii')
if host is not None and not is_ip_addr(host):
> qname, addrs = _getaddrinfo_lookup(host, family, flags)
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\greendns.py:502:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
host = 'localhost', family = <AddressFamily.AF_UNSPEC: 0>, flags = 0
def _getaddrinfo_lookup(host, family, flags):
"""Resolve a hostname to a list of addresses
Helper function for getaddrinfo.
"""
if flags & socket.AI_NUMERICHOST:
raise EAI_NONAME_ERROR
addrs = []
if family == socket.AF_UNSPEC:
err = None
for qfamily in [socket.AF_INET6, socket.AF_INET]:
try:
answer = resolve(host, qfamily, False)
except socket.gaierror as e:
if e.errno not in (socket.EAI_AGAIN, EAI_NONAME_ERROR.errno, EAI_NODATA_ERROR.errno):
raise
err = e
else:
if answer.rrset:
addrs.extend(rr.address for rr in answer.rrset)
if err is not None and not addrs:
> raise err
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\greendns.py:475:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
host = 'localhost', family = <AddressFamily.AF_UNSPEC: 0>, flags = 0
def _getaddrinfo_lookup(host, family, flags):
"""Resolve a hostname to a list of addresses
Helper function for getaddrinfo.
"""
if flags & socket.AI_NUMERICHOST:
raise EAI_NONAME_ERROR
addrs = []
if family == socket.AF_UNSPEC:
err = None
for qfamily in [socket.AF_INET6, socket.AF_INET]:
try:
> answer = resolve(host, qfamily, False)
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\greendns.py:466:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'localhost', family = <AddressFamily.AF_INET: 2>, raises = False
_proxy = <eventlet.support.greendns.ResolverProxy object at 0x000001A82B665780>
def resolve(name, family=socket.AF_INET, raises=True, _proxy=None):
"""Resolve a name for a given family using the global resolver proxy.
This method is called by the global getaddrinfo() function.
Return a dns.resolver.Answer instance. If there is no answer it's
rrset will be emtpy.
"""
if family == socket.AF_INET:
rdtype = dns.rdatatype.A
elif family == socket.AF_INET6:
rdtype = dns.rdatatype.AAAA
else:
raise socket.gaierror(socket.EAI_FAMILY,
'Address family not supported')
if _proxy is None:
_proxy = resolver
try:
try:
return _proxy.query(name, rdtype, raise_on_no_answer=raises)
except dns.resolver.NXDOMAIN:
if not raises:
return HostsAnswer(dns.name.Name(name),
rdtype, dns.rdataclass.IN, None, False)
raise
except dns.exception.Timeout:
> raise EAI_EAGAIN_ERROR
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\greendns.py:420:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
host = 'localhost', family = <AddressFamily.AF_UNSPEC: 0>, flags = 0
def _getaddrinfo_lookup(host, family, flags):
"""Resolve a hostname to a list of addresses
Helper function for getaddrinfo.
"""
if flags & socket.AI_NUMERICHOST:
raise EAI_NONAME_ERROR
addrs = []
if family == socket.AF_UNSPEC:
err = None
for qfamily in [socket.AF_INET6, socket.AF_INET]:
try:
> answer = resolve(host, qfamily, False)
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\greendns.py:466:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'localhost', family = <AddressFamily.AF_INET6: 23>, raises = False
_proxy = <eventlet.support.greendns.ResolverProxy object at 0x000001A82B665780>
def resolve(name, family=socket.AF_INET, raises=True, _proxy=None):
"""Resolve a name for a given family using the global resolver proxy.
This method is called by the global getaddrinfo() function.
Return a dns.resolver.Answer instance. If there is no answer it's
rrset will be emtpy.
"""
if family == socket.AF_INET:
rdtype = dns.rdatatype.A
elif family == socket.AF_INET6:
rdtype = dns.rdatatype.AAAA
else:
raise socket.gaierror(socket.EAI_FAMILY,
'Address family not supported')
if _proxy is None:
_proxy = resolver
try:
try:
return _proxy.query(name, rdtype, raise_on_no_answer=raises)
except dns.resolver.NXDOMAIN:
if not raises:
return HostsAnswer(dns.name.Name(name),
rdtype, dns.rdataclass.IN, None, False)
raise
except dns.exception.Timeout:
> raise EAI_EAGAIN_ERROR
E socket.gaierror: [Errno 11002] Lookup timed out
..\..\..\Miniconda3\envs\clone-athion-utils\lib\site-packages\eventlet\support\greendns.py:420: gaierror
During handling of the above exception, another exception occurred:
self = <urllib3.connectionpool.HTTPConnectionPool object at 0x000001A831B787B8>
method = 'POST', url = '/'
body = '{"figure": {"data": [{"line": {"color": "rgba(226, 74, 51, 1.0)", "dash": "solid", "shape": "linear", "width": 1.3}, ...#666666"}, "title": "", "titlefont": {"color": "#666666"}, "zerolinecolor": "#F6F6F6"}}}, "format": "png", "scale": 1}'
headers = {'User-Agent': 'python-requests/2.19.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Length': '2278'}
retries = Retry(total=0, connect=None, read=False, redirect=None, status=None)
redirect = False, assert_same_host = False
timeout = <urllib3.util.timeout.Timeout object at 0x000001A82D7B5C50>
pool_timeout = None, release_conn = False, chunked = False, body_pos = None
response_kw = {'decode_content': False, 'preload_content': False}, conn = None
release_this_conn = True, err = None, clean_exit = False
timeout_obj = <urllib3.util.timeout.Timeout object at 0x000001A831B78DD8>
is_new_proxy_conn = False
[...]
(had to cut part of the traceback because of character limit)
But once I deinstalled eventlet
and retried, it worked again.