[Errno socket error] [Errno -3] Try again
Request Method: | GET |
---|---|
Request URL: | http://www.mitoage.info/view/17779/species/ |
Django Version: | 1.7 |
Exception Type: | IOError |
Exception Value: | [Errno socket error] [Errno -3] Try again |
Exception Location: | /usr/lib/python2.7/socket.py in create_connection, line 557 |
Python Executable: | /usr/bin/python |
Python Version: | 2.7.15 |
Python Path: | ['/srv/www', '/usr/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/srv/www/mitoage', '/usr/lib/python2.7', '/usr/lib/python27.zip', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages'] |
Server time: | Fri, 29 Mar 2024 11:46:35 +0000 |
/usr/lib/python2.7/site-packages/django/core/handlers/base.py
in get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)...
except Exception as e:
# If the view raised an exception, run it through exception
# middleware, and if the exception middleware returns a
# response, use that. Otherwise, reraise the exception.
for middleware_method in self._exception_middleware:
response = middleware_method(request, e)
Variable | Value |
---|---|
e | IOError('socket error', gaierror(-3, 'Try again')) |
callback_args | () |
resolver_match | ResolverMatch(func=<function TaxonomySpeciesDetail at 0x7f96debf8398>, args=(), kwargs={'pk': u'17779'}, url_name='view_species', app_name='None', namespace='') |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f96de91de50>> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f96da016910> |
request | "<WSGIRequest\npath:/view/17779/species/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{u'CSRF_COOKIE': u'LjEYiSwRr4QjPfZLMraFuYk3MDGSHexj',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'www.mitoage.info',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '3.81.23.50',\n 'HTTP_X_FORWARDED_HOST': 'www.mitoage.info',\n 'HTTP_X_FORWARDED_PORT': '443',\n 'HTTP_X_FORWARDED_PROTO': 'https',\n 'HTTP_X_FORWARDED_SERVER': '16056cb68c94',\n 'HTTP_X_REAL_IP': '3.81.23.50',\n 'PATH_INFO': u'/view/17779/species/',\n 'QUERY_STRING': '',\n 'RAW_URI': '/view/17779/species/',\n 'REMOTE_ADDR': '10.98.30.164',\n 'REMOTE_PORT': '47850',\n 'REQUEST_METHOD': 'GET',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': '0.0.0.0',\n 'SERVER_PORT': '5000',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'gunicorn/19.1.1',\n 'gunicorn.socket': <socket._socketobject object at 0x7f96deb48ec0>,\n 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x7f96d985e110>,\n 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x7f96deab7e90>,\n 'wsgi.multiprocess': True,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
callback | <function TaxonomySpeciesDetail at 0x7f96debf8398> |
wrapped_callback | <function TaxonomySpeciesDetail at 0x7f96debf8398> |
resolver | <RegexURLResolver 'mitoage.urls' (None:None) ^/> |
callback_kwargs | {'pk': u'17779'} |
response | None |
urlconf | 'mitoage.urls' |
/usr/lib/python2.7/site-packages/django/views/generic/base.py
in view
def view(request, *args, **kwargs):
self = cls(**initkwargs)
if hasattr(self, 'get') and not hasattr(self, 'head'):
self.head = self.get
self.request = request
self.args = args
self.kwargs = kwargs
return self.dispatch(request, *args, **kwargs)...
# take name and docstring from class
update_wrapper(view, cls, updated=())
# and possible attributes set by decorators
# like csrf_exempt from dispatch
Variable | Value |
---|---|
initkwargs | {} |
self | <mitoage.taxonomy.views.TaxonomySpeciesDetail object at 0x7f96de9b4ad0> |
args | () |
request | "<WSGIRequest\npath:/view/17779/species/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{u'CSRF_COOKIE': u'LjEYiSwRr4QjPfZLMraFuYk3MDGSHexj',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'www.mitoage.info',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '3.81.23.50',\n 'HTTP_X_FORWARDED_HOST': 'www.mitoage.info',\n 'HTTP_X_FORWARDED_PORT': '443',\n 'HTTP_X_FORWARDED_PROTO': 'https',\n 'HTTP_X_FORWARDED_SERVER': '16056cb68c94',\n 'HTTP_X_REAL_IP': '3.81.23.50',\n 'PATH_INFO': u'/view/17779/species/',\n 'QUERY_STRING': '',\n 'RAW_URI': '/view/17779/species/',\n 'REMOTE_ADDR': '10.98.30.164',\n 'REMOTE_PORT': '47850',\n 'REQUEST_METHOD': 'GET',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': '0.0.0.0',\n 'SERVER_PORT': '5000',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'gunicorn/19.1.1',\n 'gunicorn.socket': <socket._socketobject object at 0x7f96deb48ec0>,\n 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x7f96d985e110>,\n 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x7f96deab7e90>,\n 'wsgi.multiprocess': True,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
kwargs | {'pk': u'17779'} |
cls | <class 'mitoage.taxonomy.views.TaxonomySpeciesDetail'> |
/usr/lib/python2.7/site-packages/django/views/generic/base.py
in dispatch
# Try to dispatch to the right method; if a method doesn't exist,
# defer to the error handler. Also defer to the error handler if the
# request method isn't on the approved list.
if request.method.lower() in self.http_method_names:
handler = getattr(self, request.method.lower(), self.http_method_not_allowed)
else:
handler = self.http_method_not_allowed
return handler(request, *args, **kwargs)...
def http_method_not_allowed(self, request, *args, **kwargs):
logger.warning('Method Not Allowed (%s): %s', request.method, request.path,
extra={
'status_code': 405,
'request': request
Variable | Value |
---|---|
self | <mitoage.taxonomy.views.TaxonomySpeciesDetail object at 0x7f96de9b4ad0> |
handler | <bound method TaxonomySpeciesDetail.get of <mitoage.taxonomy.views.TaxonomySpeciesDetail object at 0x7f96de9b4ad0>> |
request | "<WSGIRequest\npath:/view/17779/species/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{u'CSRF_COOKIE': u'LjEYiSwRr4QjPfZLMraFuYk3MDGSHexj',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'www.mitoage.info',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '3.81.23.50',\n 'HTTP_X_FORWARDED_HOST': 'www.mitoage.info',\n 'HTTP_X_FORWARDED_PORT': '443',\n 'HTTP_X_FORWARDED_PROTO': 'https',\n 'HTTP_X_FORWARDED_SERVER': '16056cb68c94',\n 'HTTP_X_REAL_IP': '3.81.23.50',\n 'PATH_INFO': u'/view/17779/species/',\n 'QUERY_STRING': '',\n 'RAW_URI': '/view/17779/species/',\n 'REMOTE_ADDR': '10.98.30.164',\n 'REMOTE_PORT': '47850',\n 'REQUEST_METHOD': 'GET',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': '0.0.0.0',\n 'SERVER_PORT': '5000',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'gunicorn/19.1.1',\n 'gunicorn.socket': <socket._socketobject object at 0x7f96deb48ec0>,\n 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x7f96d985e110>,\n 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x7f96deab7e90>,\n 'wsgi.multiprocess': True,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
args | () |
kwargs | {'pk': u'17779'} |
/usr/lib/python2.7/site-packages/django/views/generic/detail.py
in get
class BaseDetailView(SingleObjectMixin, View):
"""
A base view for displaying a single object
"""
def get(self, request, *args, **kwargs):
self.object = self.get_object()
context = self.get_context_data(object=self.object)...
return self.render_to_response(context)
class SingleObjectTemplateResponseMixin(TemplateResponseMixin):
template_name_field = None
template_name_suffix = '_detail'
Variable | Value |
---|---|
self | <mitoage.taxonomy.views.TaxonomySpeciesDetail object at 0x7f96de9b4ad0> |
args | () |
request | "<WSGIRequest\npath:/view/17779/species/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{u'CSRF_COOKIE': u'LjEYiSwRr4QjPfZLMraFuYk3MDGSHexj',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'www.mitoage.info',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '3.81.23.50',\n 'HTTP_X_FORWARDED_HOST': 'www.mitoage.info',\n 'HTTP_X_FORWARDED_PORT': '443',\n 'HTTP_X_FORWARDED_PROTO': 'https',\n 'HTTP_X_FORWARDED_SERVER': '16056cb68c94',\n 'HTTP_X_REAL_IP': '3.81.23.50',\n 'PATH_INFO': u'/view/17779/species/',\n 'QUERY_STRING': '',\n 'RAW_URI': '/view/17779/species/',\n 'REMOTE_ADDR': '10.98.30.164',\n 'REMOTE_PORT': '47850',\n 'REQUEST_METHOD': 'GET',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': '0.0.0.0',\n 'SERVER_PORT': '5000',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'gunicorn/19.1.1',\n 'gunicorn.socket': <socket._socketobject object at 0x7f96deb48ec0>,\n 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x7f96d985e110>,\n 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x7f96deab7e90>,\n 'wsgi.multiprocess': True,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
kwargs | {'pk': u'17779'} |
/srv/www/mitoage/taxonomy/views.py
in get_context_data
Breadcrumb(self.object.taxonomy_family.name, "browse_family", [self.object.taxonomy_family.pk]),
Breadcrumb(self.object.name, "", None),]
context['base_compositions'] = self.get_base_compositions(self.object)
context['general_sections'] = ["total_mtDNA", "total_pc_mtDNA", "d_loop_mtDNA", "total_tRNA_mtDNA", "total_rRNA_mtDNA", "rRNA_12S", "rRNA_16S"]
context['gene_sections'] = ['atp6', 'atp8', 'cox1', 'cox2', 'cox3', 'cytb', 'nd1', 'nd2', 'nd3', 'nd4', 'nd4l', 'nd5', 'nd6']
context['codon_usages'] = self.get_codon_usages(self.object)
context['codon_usage_sections'] = ['atp6', 'atp8', 'cox1', 'cox2', 'cox3', 'cytb', 'nd1', 'nd2', 'nd3', 'nd4', 'nd4l', 'nd5', 'nd6', 'total_pc_mtDNA']
context['fasta'] = retrieve_fasta(self.object.name)...
return context
def get_base_compositions(self, species):
try:
mitoage_entry = species.mitoage_entries.first()
if mitoage_entry:
Variable | Value |
---|---|
self | <mitoage.taxonomy.views.TaxonomySpeciesDetail object at 0x7f96de9b4ad0> |
context | {'base_compositions': {'atp6': <mitoage.analysis.models.BaseComposition instance at 0x7f96deb5b488>, 'atp8': <mitoage.analysis.models.BaseComposition instance at 0x7f96d9bcc998>, 'cox1': <mitoage.analysis.models.BaseComposition instance at 0x7f96deaeeef0>, 'cox2': <mitoage.analysis.models.BaseComposition instance at 0x7f96de7fee18>, 'cox3': <mitoage.analysis.models.BaseComposition instance at 0x7f96d9bcc3f8>, 'cytb': <mitoage.analysis.models.BaseComposition instance at 0x7f96deb5bc68>, 'd_loop_mtDNA': <mitoage.analysis.models.BaseComposition instance at 0x7f96deaee098>, 'nd1': <mitoage.analysis.models.BaseComposition instance at 0x7f96de7fe0e0>, 'nd2': <mitoage.analysis.models.BaseComposition instance at 0x7f96d9718950>, 'nd3': <mitoage.analysis.models.BaseComposition instance at 0x7f96d9718dd0>, 'nd4': <mitoage.analysis.models.BaseComposition instance at 0x7f96d9718b00>, 'nd4l': <mitoage.analysis.models.BaseComposition instance at 0x7f96d97183f8>, 'nd5': <mitoage.analysis.models.BaseComposition instance at 0x7f96d9718ab8>, 'nd6': <mitoage.analysis.models.BaseComposition instance at 0x7f96d97186c8>, 'rRNA_12S': <mitoage.analysis.models.BaseComposition instance at 0x7f96d9718b48>, 'rRNA_16S': <mitoage.analysis.models.BaseComposition instance at 0x7f96d9718638>, 'total_mtDNA': <mitoage.analysis.models.BaseComposition instance at 0x7f96de80fb90>, 'total_pc_mtDNA': <mitoage.analysis.models.BaseComposition instance at 0x7f96de8d5a28>, 'total_rRNA_mtDNA': <mitoage.analysis.models.BaseComposition instance at 0x7f96d9bcc200>, 'total_tRNA_mtDNA': <mitoage.analysis.models.BaseComposition instance at 0x7f96deb5b9e0>}, 'breadcrumbs': [<mitoage.taxonomy.views.Breadcrumb instance at 0x7f96de8d5560>, <mitoage.taxonomy.views.Breadcrumb instance at 0x7f96da00ec20>, <mitoage.taxonomy.views.Breadcrumb instance at 0x7f96d9703e18>, <mitoage.taxonomy.views.Breadcrumb instance at 0x7f96de80f4d0>, <mitoage.taxonomy.views.Breadcrumb instance at 0x7f96deb35368>], 'codon_usage_sections': ['atp6', 'atp8', 'cox1', 'cox2', 'cox3', 'cytb', 'nd1', 'nd2', 'nd3', 'nd4', 'nd4l', 'nd5', 'nd6', 'total_pc_mtDNA'], 'codon_usages': {'atp6': <CodonUsage: CodonUsage object>, 'atp8': <CodonUsage: CodonUsage object>, 'cox1': <CodonUsage: CodonUsage object>, 'cox2': <CodonUsage: CodonUsage object>, 'cox3': <CodonUsage: CodonUsage object>, 'cytb': <CodonUsage: CodonUsage object>, 'nd1': <CodonUsage: CodonUsage object>, 'nd2': <CodonUsage: CodonUsage object>, 'nd3': <CodonUsage: CodonUsage object>, 'nd4': <CodonUsage: CodonUsage object>, 'nd4l': <CodonUsage: CodonUsage object>, 'nd5': <CodonUsage: CodonUsage object>, 'nd6': <CodonUsage: CodonUsage object>, 'total_pc_mtDNA': <CodonUsage: CodonUsage object>}, 'gene_sections': ['atp6', 'atp8', 'cox1', 'cox2', 'cox3', 'cytb', 'nd1', 'nd2', 'nd3', 'nd4', 'nd4l', 'nd5', 'nd6'], 'general_sections': ['total_mtDNA', 'total_pc_mtDNA', 'd_loop_mtDNA', 'total_tRNA_mtDNA', 'total_rRNA_mtDNA', 'rRNA_12S', 'rRNA_16S'], u'object': <TaxonomySpecies: Rangifer tarandus>, 'taxonomyspecies': <TaxonomySpecies: Rangifer tarandus>, u'view': <mitoage.taxonomy.views.TaxonomySpeciesDetail object at 0x7f96de9b4ad0>} |
kwargs | {'object': <TaxonomySpecies: Rangifer tarandus>} |
/srv/www/mitoage/taxonomy/utils.py
in retrieve_fasta
return (db_errors, already_in_db, consistent_changes)
def retrieve_fasta(name):
url = 'https://www.ncbi.nlm.nih.gov/nuccore/?term=(%22' + urllib.quote_plus(name) + '%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter])'
search_url = urllib.urlopen(url)...
redirect_url = search_url.geturl()
id = redirect_url.rsplit('/', 1)[-1] # after last /
final_url = 'https://www.ncbi.nlm.nih.gov/sviewer/viewer.fcgi?id=' + id + '&db=nuccore&report=fasta&extrafeat=null&conwithfeat=on&hide-cdd=on&retmode=html&withmarkup=on&tool=portal&log$=seqview&maxdownloadsize=1000000'
page = urllib.urlopen(final_url)
fasta = page.read()
page.close()
Variable | Value |
---|---|
url | u'https://www.ncbi.nlm.nih.gov/nuccore/?term=(%22Rangifer+tarandus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter])' |
name | u'Rangifer tarandus' |
/usr/lib/python2.7/urllib.py
in urlopen
opener = FancyURLopener(proxies=proxies, context=context)
elif not _urlopener:
opener = FancyURLopener()
_urlopener = opener
else:
opener = _urlopener
if data is None:
return opener.open(url)...
else:
return opener.open(url, data)
def urlretrieve(url, filename=None, reporthook=None, data=None, context=None):
global _urlopener
if context is not None:
opener = FancyURLopener(context=context)
Variable | Value |
---|---|
url | u'https://www.ncbi.nlm.nih.gov/nuccore/?term=(%22Rangifer+tarandus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter])' |
warnpy3k | <function warnpy3k at 0x7f96e58f7b18> |
opener | <urllib.FancyURLopener instance at 0x7f96deadea28> |
context | None |
proxies | None |
data | None |
/usr/lib/python2.7/urllib.py
in open
if not hasattr(self, name):
if proxy:
return self.open_unknown_proxy(proxy, fullurl, data)
else:
return self.open_unknown(fullurl, data)
try:
if data is None:
return getattr(self, name)(url)...
else:
return getattr(self, name)(url, data)
except socket.error, msg:
raise IOError, ('socket error', msg), sys.exc_info()[2]
def open_unknown(self, fullurl, data=None):
Variable | Value |
---|---|
urltype | 'https' |
name | 'open_https' |
url | '//www.ncbi.nlm.nih.gov/nuccore/?term=(%22Rangifer+tarandus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter])' |
self | <urllib.FancyURLopener instance at 0x7f96deadea28> |
proxy | None |
msg | gaierror(-3, 'Try again') |
data | None |
fullurl | 'https://www.ncbi.nlm.nih.gov/nuccore/?term=(%22Rangifer+tarandus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter])' |
/usr/lib/python2.7/urllib.py
in open_https
h.putheader('Content-Length', '%d' % len(data))
else:
h.putrequest('GET', selector)
if proxy_auth: h.putheader('Proxy-Authorization', 'Basic %s' % proxy_auth)
if auth: h.putheader('Authorization', 'Basic %s' % auth)
if realhost: h.putheader('Host', realhost)
for args in self.addheaders: h.putheader(*args)
h.endheaders(data)...
errcode, errmsg, headers = h.getreply()
fp = h.getfile()
if errcode == -1:
if fp: fp.close()
# something went wrong with the HTTP status line
raise IOError, ('http protocol error', 0,
Variable | Value |
---|---|
httplib | <module 'httplib' from '/usr/lib/python2.7/httplib.pyc'> |
url | '//www.ncbi.nlm.nih.gov/nuccore/?term=(%22Rangifer+tarandus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter])' |
h | <httplib.HTTPS instance at 0x7f96de938200> |
self | <urllib.FancyURLopener instance at 0x7f96deadea28> |
args | ('Accept', '*/*') |
proxy_passwd | None |
auth | None |
selector | '/nuccore/?term=(%22Rangifer+tarandus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter])' |
user_passwd | None |
host | 'www.ncbi.nlm.nih.gov' |
realhost | 'www.ncbi.nlm.nih.gov' |
proxy_auth | None |
data | None |
/usr/lib/python2.7/httplib.py
in endheaders
the same packet as the message headers if it is string, otherwise it is
sent as a separate packet.
"""
if self.__state == _CS_REQ_STARTED:
self.__state = _CS_REQ_SENT
else:
raise CannotSendHeader()
self._send_output(message_body)...
def request(self, method, url, body=None, headers={}):
"""Send a complete request to the server."""
self._send_request(method, url, body, headers)
def _set_content_length(self, body, method):
Variable | Value |
---|---|
message_body | None |
self | <httplib.HTTPSConnection instance at 0x7f96da00ed40> |
/usr/lib/python2.7/httplib.py
in _send_output
del self._buffer[:]
# If msg and message_body are sent in a single send() call,
# it will avoid performance problems caused by the interaction
# between delayed ack and the Nagle algorithm.
if isinstance(message_body, str):
msg += message_body
message_body = None
self.send(msg)...
if message_body is not None:
#message_body was not a string (i.e. it is a file) and
#we must run the risk of Nagle
self.send(message_body)
def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0):
Variable | Value |
---|---|
msg | 'GET /nuccore/?term=(%22Rangifer+tarandus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter]) HTTP/1.0\r\nHost: www.ncbi.nlm.nih.gov\r\nUser-Agent: Python-urllib/1.17\r\nAccept: */*\r\n\r\n' |
message_body | None |
self | <httplib.HTTPSConnection instance at 0x7f96da00ed40> |
/usr/lib/python2.7/httplib.py
in send
self.__response = None
response.close()
def send(self, data):
"""Send `data' to the server."""
if self.sock is None:
if self.auto_open:
self.connect()...
else:
raise NotConnected()
if self.debuglevel > 0:
print "send:", repr(data)
blocksize = 8192
Variable | Value |
---|---|
self | <httplib.HTTPSConnection instance at 0x7f96da00ed40> |
data | 'GET /nuccore/?term=(%22Rangifer+tarandus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter]) HTTP/1.0\r\nHost: www.ncbi.nlm.nih.gov\r\nUser-Agent: Python-urllib/1.17\r\nAccept: */*\r\n\r\n' |
/usr/lib/python2.7/httplib.py
in connect
if key_file or cert_file:
context.load_cert_chain(cert_file, key_file)
self._context = context
def connect(self):
"Connect to a host on a given (SSL) port."
HTTPConnection.connect(self)...
if self._tunnel_host:
server_hostname = self._tunnel_host
else:
server_hostname = self.host
Variable | Value |
---|---|
self | <httplib.HTTPSConnection instance at 0x7f96da00ed40> |
/usr/lib/python2.7/httplib.py
in connect
if line == '\r\n':
break
def connect(self):
"""Connect to the host and port specified in __init__."""
self.sock = self._create_connection((self.host,self.port),
self.timeout, self.source_address)...
if self._tunnel_host:
self._tunnel()
def close(self):
"""Close the connection to the HTTP server."""
Variable | Value |
---|---|
self | <httplib.HTTPSConnection instance at 0x7f96da00ed40> |
/usr/lib/python2.7/socket.py
in create_connection
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.
A host of '' or port 0 tells the OS to use the default.
"""
host, port = address
err = None
for res in getaddrinfo(host, port, 0, SOCK_STREAM):...
af, socktype, proto, canonname, sa = res
sock = None
try:
sock = socket(af, socktype, proto)
if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
sock.settimeout(timeout)
Variable | Value |
---|---|
err | None |
host | 'www.ncbi.nlm.nih.gov' |
timeout | <object object at 0x7f96e59420d0> |
address | ('www.ncbi.nlm.nih.gov', 443) |
source_address | None |
port | 443 |
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
HTTP_X_FORWARDED_SERVER | '16056cb68c94' |
SERVER_SOFTWARE | 'gunicorn/19.1.1' |
SCRIPT_NAME | u'' |
HTTP_X_FORWARDED_PORT | '443' |
PATH_INFO | u'/view/17779/species/' |
SERVER_PROTOCOL | 'HTTP/1.1' |
QUERY_STRING | '' |
REMOTE_ADDR | '10.98.30.164' |
HTTP_X_REAL_IP | '3.81.23.50' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_CONNECTION | 'close' |
REMOTE_PORT | '47850' |
SERVER_NAME | '0.0.0.0' |
gunicorn.socket | <socket._socketobject object at 0x7f96deb48ec0> |
wsgi.url_scheme | 'http' |
SERVER_PORT | '5000' |
HTTP_X_FORWARDED_PROTO | 'https' |
wsgi.input | <gunicorn.http.body.Body object at 0x7f96deab7e90> |
HTTP_HOST | 'www.mitoage.info' |
wsgi.multithread | False |
HTTP_ACCEPT | '*/*' |
wsgi.version | (1, 0) |
RAW_URI | '/view/17779/species/' |
wsgi.run_once | False |
wsgi.errors | <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x7f96d985e110> |
wsgi.multiprocess | True |
HTTP_X_FORWARDED_HOST | 'www.mitoage.info' |
HTTP_X_FORWARDED_FOR | '3.81.23.50' |
REQUEST_METHOD | 'GET' |
wsgi.file_wrapper | '' |
CSRF_COOKIE | u'LjEYiSwRr4QjPfZLMraFuYk3MDGSHexj' |
HTTP_ACCEPT_ENCODING | 'gzip' |
mitoage.settings
Setting | Value |
---|---|
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
CSRF_COOKIE_SECURE | False |
LANGUAGE_CODE | 'en-us' |
ROOT_URLCONF | 'mitoage.urls' |
MANAGERS | (('Robi Tacutu', 'robi.tacutu@gmail.com'),) |
BASE_DIR | '/srv/www' |
TEST_NON_SERIALIZED_APPS | [] |
DEFAULT_CHARSET | 'utf-8' |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
STATIC_ROOT | 'static_collected_files' |
ALLOWED_HOSTS | ['www.mitoage.org', 'www.mitoage.info', 'mitoage.org', 'mitoage.info', 'localhost', '127.0.0.1'] |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
SEND_BROKEN_LINK_EMAILS | False |
STATICFILES_FINDERS | ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_NAME | 'sessionid' |
ADMIN_FOR | () |
TIME_INPUT_FORMATS | ('%H:%M:%S', '%H:%M:%S.%f', '%H:%M') |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'HOST': 'db', 'NAME': 'mitoage', 'OPTIONS': {}, 'PASSWORD': u'********************', 'PORT': 5432, 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': 'UTC', 'USER': 'mitoage'}} |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
SUIT_CONFIG | {'ADMIN_NAME': 'MitoAge - the admin', 'CONFIRM_UNSAVED_CHANGES': True, 'HEADER_DATE_FORMAT': 'l, j. F Y', 'HEADER_TIME_FORMAT': 'H:i', 'LIST_PER_PAGE': 15, 'MENU': ({'icon': 'icon-heart', 'label': 'Back to website', 'url': '/'}, {'app': 'sites', 'icon': 'icon-cog', 'label': 'Sites & settings', 'models': ('site',)}, {'app': 'auth', 'icon': 'icon-lock', 'label': 'Authentication', 'models': ('auth.user', 'auth.group')}, {'app': 'taxonomy', 'icon': 'icon-leaf', 'label': 'Taxonomy', 'models': ('taxonomy.taxonomyspecies', 'taxonomy.taxonomyfamily', 'taxonomy.taxonomyorder', 'taxonomy.taxonomyclass', {'label': 'Import taxonomy', 'url': 'admin:taxonomy_csvimport'})}, {'icon': 'icon-tag', 'label': 'Lifespan@AnAge', 'url': 'admin:anage_csvimport'}, {'app': 'analysis', 'icon': 'icon-star', 'label': 'MitoAge', 'models': ('analysis.mitoageentry', {'label': 'Import base composition', 'url': 'admin:bc_csvimport'}, {'label': 'Import codon usage', 'url': 'admin:cu_csvimport'})}, {'app': 'analysis', 'icon': 'icon-star', 'label': 'Cache', 'models': ('analysis.statscache',)}, {'icon': 'icon-list-alt', 'label': 'Future ToDOs', 'url': 'admin:todo_list'}, {'icon': 'icon-list-alt', 'label': 'Versions', 'url': 'admin:version_list'}), 'MENU_ICONS': {'auth': 'icon-lock', 'sites': 'icon-leaf'}, 'MENU_OPEN_FIRST_CHILD': True, 'SHOW_REQUIRED_ASTERISK': True} |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') |
DEFAULT_CONTENT_TYPE | 'text/html' |
APPEND_SLASH | True |
LOCALE_PATHS | () |
DATABASE_ROUTERS | [] |
DEFAULT_TABLESPACE | '' |
YEAR_MONTH_FORMAT | 'F Y' |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
SERVER_EMAIL | 'root@localhost' |
SESSION_COOKIE_PATH | '/' |
SILENCED_SYSTEM_CHECKS | [] |
MIDDLEWARE_CLASSES | ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware') |
USE_I18N | True |
THOUSAND_SEPARATOR | ',' |
SECRET_KEY | u'********************' |
LANGUAGE_COOKIE_NAME | 'django_language' |
DEFAULT_INDEX_TABLESPACE | '' |
TRANSACTIONS_MANAGED | False |
LOGGING_CONFIG | 'logging.config.dictConfig' |
TCP | ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages') |
TEMPLATE_LOADERS | ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') |
FIRST_DAY_OF_WEEK | 0 |
WSGI_APPLICATION | 'mitoage.wsgi.application' |
TEMPLATE_DEBUG | True |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
CSRF_COOKIE_NAME | 'csrftoken' |
FORCE_SCRIPT_NAME | None |
USE_X_FORWARDED_HOST | False |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SESSION_COOKIE_SECURE | False |
CSRF_COOKIE_DOMAIN | None |
FILE_CHARSET | 'utf-8' |
DEBUG | True |
LANGUAGE_COOKIE_DOMAIN | None |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
INSTALLED_APPS | ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'mitoage', 'mitoage.static_pages', 'mitoage.taxonomy', 'mitoage.analysis', 'bootstrap_pagination', 'background_task', 'suit', 'django.contrib.admin') |
LANGUAGES | (('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmal'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese'), ('zh-tw', 'Traditional Chinese')) |
COMMENTS_ALLOW_PROFANITIES | False |
STATICFILES_DIRS | () |
PREPEND_WWW | False |
SECURE_PROXY_SSL_HEADER | None |
LANGUAGE_COOKIE_AGE | None |
SESSION_COOKIE_HTTPONLY | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
INTERNAL_IPS | () |
MONTH_DAY_FORMAT | 'F j' |
LOGIN_URL | '/accounts/login/' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
TIME_FORMAT | 'P' |
AUTH_USER_MODEL | 'auth.User' |
DATE_INPUT_FORMATS | ('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y') |
AUTHENTICATION_BACKENDS | ('django.contrib.auth.backends.ModelBackend',) |
EMAIL_HOST_PASSWORD | u'********************' |
PASSWORD_RESET_TIMEOUT_DAYS | u'********************' |
SESSION_FILE_PATH | None |
CACHE_MIDDLEWARE_ALIAS | 'default' |
SESSION_SAVE_EVERY_REQUEST | False |
NUMBER_GROUPING | 0 |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_COOKIE_PATH | '/' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
DECIMAL_SEPARATOR | '.' |
IGNORABLE_404_URLS | () |
MIGRATION_MODULES | {} |
TEMPLATE_STRING_IF_INVALID | '' |
LOGOUT_URL | '/accounts/logout/' |
EMAIL_USE_TLS | False |
FIXTURE_DIRS | () |
EMAIL_HOST | 'localhost' |
DATE_FORMAT | 'N j, Y' |
MEDIA_ROOT | '' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
ADMINS | (('Robi Tacutu', 'robi.tacutu@gmail.com'),) |
FORMAT_MODULE_PATH | None |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
MEDIA_URL | '' |
DATETIME_FORMAT | 'N j, Y, P' |
TEMPLATE_DIRS | ('/srv/www/templates',) |
SITE_ID | 1 |
DISALLOWED_USER_AGENTS | () |
ALLOWED_INCLUDE_ROOTS | () |
LOGGING | {'disable_existing_loggers': False, 'handlers': {'console': {'class': 'logging.StreamHandler'}}, 'root': {'handlers': ['console'], 'level': 'INFO'}, 'version': 1} |
SHORT_DATE_FORMAT | 'm/d/Y' |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
CACHE_MIDDLEWARE_KEY_PREFIX | u'********************' |
TIME_ZONE | 'Europe/London' |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_USE_SSL | False |
TEMPLATE_CONTEXT_PROCESSORS | ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'django.core.context_processors.request') |
SESSION_COOKIE_AGE | 1209600 |
SETTINGS_MODULE | 'mitoage.settings' |
USE_ETAGS | False |
LANGUAGES_BIDI | ('he', 'ar', 'fa', 'ur') |
FILE_UPLOAD_TEMP_DIR | None |
CSRF_COOKIE_AGE | 31449600 |
STATIC_URL | '/static/' |
EMAIL_PORT | 25 |
USE_TZ | True |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
PASSWORD_HASHERS | u'********************' |
ABSOLUTE_URL_OVERRIDES | {} |
LANGUAGE_COOKIE_PATH | '/' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CSRF_COOKIE_HTTPONLY | False |
DATETIME_INPUT_FORMATS | ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y') |
EMAIL_HOST_USER | '' |
PROFANITIES_LIST | u'********************' |
You're seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard 500 page.