[Errno socket error] [Errno -3] Try again
Request Method: | GET |
---|---|
Request URL: | http://www.mitoage.info/view/17841/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:48:16 +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 0x7f96debfe9b0>, args=(), kwargs={'pk': u'17841'}, url_name='view_species', app_name='None', namespace='') |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f96d6edec10>> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f96d6ede690> |
request | "<WSGIRequest\npath:/view/17841/species/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{u'CSRF_COOKIE': u'U4r0KJN34K9y5M0agDuos44i0A7XA9WI',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'www.mitoage.info',\n 'HTTP_REFERER': 'http://www.mitoage.info/view/17841/species/',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '3.235.229.251',\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.235.229.251',\n 'PATH_INFO': u'/view/17841/species/',\n 'QUERY_STRING': '',\n 'RAW_URI': '/view/17841/species/',\n 'REMOTE_ADDR': '10.98.30.164',\n 'REMOTE_PORT': '48016',\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 0x7f96d6c27130>,\n 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x7f96de8c6090>,\n 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x7f96de8c6410>,\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 0x7f96debfe9b0> |
wrapped_callback | <function TaxonomySpeciesDetail at 0x7f96debfe9b0> |
resolver | <RegexURLResolver 'mitoage.urls' (None:None) ^/> |
callback_kwargs | {'pk': u'17841'} |
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 0x7f96dea083d0> |
args | () |
request | "<WSGIRequest\npath:/view/17841/species/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{u'CSRF_COOKIE': u'U4r0KJN34K9y5M0agDuos44i0A7XA9WI',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'www.mitoage.info',\n 'HTTP_REFERER': 'http://www.mitoage.info/view/17841/species/',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '3.235.229.251',\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.235.229.251',\n 'PATH_INFO': u'/view/17841/species/',\n 'QUERY_STRING': '',\n 'RAW_URI': '/view/17841/species/',\n 'REMOTE_ADDR': '10.98.30.164',\n 'REMOTE_PORT': '48016',\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 0x7f96d6c27130>,\n 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x7f96de8c6090>,\n 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x7f96de8c6410>,\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'17841'} |
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 0x7f96dea083d0> |
handler | <bound method TaxonomySpeciesDetail.get of <mitoage.taxonomy.views.TaxonomySpeciesDetail object at 0x7f96dea083d0>> |
request | "<WSGIRequest\npath:/view/17841/species/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{u'CSRF_COOKIE': u'U4r0KJN34K9y5M0agDuos44i0A7XA9WI',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'www.mitoage.info',\n 'HTTP_REFERER': 'http://www.mitoage.info/view/17841/species/',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '3.235.229.251',\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.235.229.251',\n 'PATH_INFO': u'/view/17841/species/',\n 'QUERY_STRING': '',\n 'RAW_URI': '/view/17841/species/',\n 'REMOTE_ADDR': '10.98.30.164',\n 'REMOTE_PORT': '48016',\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 0x7f96d6c27130>,\n 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x7f96de8c6090>,\n 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x7f96de8c6410>,\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'17841'} |
/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 0x7f96dea083d0> |
args | () |
request | "<WSGIRequest\npath:/view/17841/species/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{u'CSRF_COOKIE': u'U4r0KJN34K9y5M0agDuos44i0A7XA9WI',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'www.mitoage.info',\n 'HTTP_REFERER': 'http://www.mitoage.info/view/17841/species/',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_FORWARDED_FOR': '3.235.229.251',\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.235.229.251',\n 'PATH_INFO': u'/view/17841/species/',\n 'QUERY_STRING': '',\n 'RAW_URI': '/view/17841/species/',\n 'REMOTE_ADDR': '10.98.30.164',\n 'REMOTE_PORT': '48016',\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 0x7f96d6c27130>,\n 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x7f96de8c6090>,\n 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x7f96de8c6410>,\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'17841'} |
/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 0x7f96dea083d0> |
context | {'base_compositions': {'atp6': <mitoage.analysis.models.BaseComposition instance at 0x7f96d54ad518>, 'atp8': <mitoage.analysis.models.BaseComposition instance at 0x7f96d54addd0>, 'cox1': <mitoage.analysis.models.BaseComposition instance at 0x7f96d54ad758>, 'cox2': <mitoage.analysis.models.BaseComposition instance at 0x7f96d54ad2d8>, 'cox3': <mitoage.analysis.models.BaseComposition instance at 0x7f96d54ade60>, 'cytb': <mitoage.analysis.models.BaseComposition instance at 0x7f96de6b2758>, 'd_loop_mtDNA': <mitoage.analysis.models.BaseComposition instance at 0x7f96d54ad290>, 'nd1': <mitoage.analysis.models.BaseComposition instance at 0x7f96d6556bd8>, 'nd2': <mitoage.analysis.models.BaseComposition instance at 0x7f96d6556c68>, 'nd3': <mitoage.analysis.models.BaseComposition instance at 0x7f96d6556cb0>, 'nd4': <mitoage.analysis.models.BaseComposition instance at 0x7f96d54adc20>, 'nd4l': <mitoage.analysis.models.BaseComposition instance at 0x7f96d65561b8>, 'nd5': <mitoage.analysis.models.BaseComposition instance at 0x7f96d54ad830>, 'nd6': <mitoage.analysis.models.BaseComposition instance at 0x7f96d69c4878>, 'rRNA_12S': <mitoage.analysis.models.BaseComposition instance at 0x7f96d69c4ab8>, 'rRNA_16S': <mitoage.analysis.models.BaseComposition instance at 0x7f96d69c4ef0>, 'total_mtDNA': <mitoage.analysis.models.BaseComposition instance at 0x7f96d54b2ea8>, 'total_pc_mtDNA': <mitoage.analysis.models.BaseComposition instance at 0x7f96deaf15f0>, 'total_rRNA_mtDNA': <mitoage.analysis.models.BaseComposition instance at 0x7f96d54ad560>, 'total_tRNA_mtDNA': <mitoage.analysis.models.BaseComposition instance at 0x7f96de695638>}, 'breadcrumbs': [<mitoage.taxonomy.views.Breadcrumb instance at 0x7f96e02272d8>, <mitoage.taxonomy.views.Breadcrumb instance at 0x7f96d826e248>, <mitoage.taxonomy.views.Breadcrumb instance at 0x7f96de6b3758>, <mitoage.taxonomy.views.Breadcrumb instance at 0x7f96deaf1050>, <mitoage.taxonomy.views.Breadcrumb instance at 0x7f96deaf1d40>], '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: Gallinula chloropus>, 'taxonomyspecies': <TaxonomySpecies: Gallinula chloropus>, u'view': <mitoage.taxonomy.views.TaxonomySpeciesDetail object at 0x7f96dea083d0>} |
kwargs | {'object': <TaxonomySpecies: Gallinula chloropus>} |
/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=(%22Gallinula+chloropus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter])' |
name | u'Gallinula chloropus' |
/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=(%22Gallinula+chloropus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter])' |
warnpy3k | <function warnpy3k at 0x7f96e58f7b18> |
opener | <urllib.FancyURLopener instance at 0x7f96deae7e60> |
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=(%22Gallinula+chloropus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter])' |
self | <urllib.FancyURLopener instance at 0x7f96deae7e60> |
proxy | None |
msg | gaierror(-3, 'Try again') |
data | None |
fullurl | 'https://www.ncbi.nlm.nih.gov/nuccore/?term=(%22Gallinula+chloropus%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=(%22Gallinula+chloropus%22[Organism])%20AND%20(refseq[filter]%20AND%20mitochondrion[filter])' |
h | <httplib.HTTPS instance at 0x7f96d5c55cf8> |
self | <urllib.FancyURLopener instance at 0x7f96deae7e60> |
args | ('Accept', '*/*') |
proxy_passwd | None |
auth | None |
selector | '/nuccore/?term=(%22Gallinula+chloropus%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 0x7f96deb595f0> |
/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=(%22Gallinula+chloropus%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 0x7f96deb595f0> |
/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 0x7f96deb595f0> |
data | 'GET /nuccore/?term=(%22Gallinula+chloropus%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 0x7f96deb595f0> |
/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 0x7f96deb595f0> |
/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' |
HTTP_REFERER | 'http://www.mitoage.info/view/17841/species/' |
SERVER_SOFTWARE | 'gunicorn/19.1.1' |
SCRIPT_NAME | u'' |
HTTP_X_FORWARDED_PORT | '443' |
PATH_INFO | u'/view/17841/species/' |
SERVER_PROTOCOL | 'HTTP/1.1' |
QUERY_STRING | '' |
REMOTE_ADDR | '10.98.30.164' |
HTTP_X_REAL_IP | '3.235.229.251' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_CONNECTION | 'close' |
REMOTE_PORT | '48016' |
SERVER_NAME | '0.0.0.0' |
gunicorn.socket | <socket._socketobject object at 0x7f96d6c27130> |
wsgi.url_scheme | 'http' |
SERVER_PORT | '5000' |
HTTP_X_FORWARDED_PROTO | 'https' |
wsgi.input | <gunicorn.http.body.Body object at 0x7f96de8c6410> |
HTTP_HOST | 'www.mitoage.info' |
wsgi.multithread | False |
HTTP_ACCEPT | '*/*' |
wsgi.version | (1, 0) |
RAW_URI | '/view/17841/species/' |
wsgi.run_once | False |
wsgi.errors | <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x7f96de8c6090> |
wsgi.multiprocess | True |
HTTP_X_FORWARDED_HOST | 'www.mitoage.info' |
HTTP_X_FORWARDED_FOR | '3.235.229.251' |
REQUEST_METHOD | 'GET' |
wsgi.file_wrapper | '' |
CSRF_COOKIE | u'U4r0KJN34K9y5M0agDuos44i0A7XA9WI' |
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.