9th March 2010

Why do celebrities think they can use Twitter just the way they want to? Don't they know they've a public duty to entertain us for free and should use social networks to do so? And shouldn't we reserve our right to block them when they start demanding money like petty beggars?

Gaaawwwd that felt good... and is incidentally not at all what I think. There are lots of problematic buzzwords there, least of all "celebrity". But there is a question - at least in my mind - about how people who are well-known and well-liked use Twitter. Not for our benefit, but for their own.

Chris Unitt has pointed out to me before that it is unwise and unfair to dictate how people should use Twitter, and I'd never want to do so. But when browsing the pages of the well-known or looking through their tweets as they pass through my stream, it seems a shame that so many of them are directed at their fellow well-known...alites. Or something. (I feel loath to use the word "celebs" as it just conjures up images of Jordan and Peter for me.)

TemplateSyntaxError at /api/gethtml/

TemplateSyntaxError at /api/gethtml/

Caught DatabaseError while rendering: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
Request Method: GET
Request URL: http://tweetpaste.thingamaweb.com/api/gethtml/?iframe_width=354&id=10238807054
Django Version: 1.3 pre-alpha
Exception Type: TemplateSyntaxError
Exception Value:
Caught DatabaseError while rendering: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
Exception Location: /usr/lib/pymodules/python2.6/MySQLdb/connections.py in defaulterrorhandler, line 35
Python Executable: /usr/bin/python
Python Version: 2.6.4
Python Path: ['/web/sites/thingamaweb.com/', '/usr/local/lib/python2.6/dist-packages/elementtree-1.2.7_20070827_preview-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/lxml-2.2.4-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/python_twitter-0.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/simplejson-2.0.9-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/recaptcha_client-1.0.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Markdown-2.0.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_tracking-0.2.7-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/geopy-0.94-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Whoosh-0.3.18-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/mutagen-1.19-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/GChartWrapper-0.9-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/flickrapi-1.4.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_debug_toolbar-0.8.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/sorl_thumbnail-3.2.5-py2.6.egg', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/pymodules/python2.6', '/usr/local/lib/python2.6/dist-packages']
Server time: Sat, 31 Jul 2010 14:32:38 +0100

Template error

In template <unknown source>, error at line 1

Caught DatabaseError while rendering: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")

1 <iframe name="tp{{ pasting.id }}" id="tp{{ pasting.id }}" width="{{ pasting.iframe_width }}" height="{{ pasting.iframe_height }}" frameborder="0" src="http://{{ site.domain }}{{ pasting.get_iframe_url }}" style="overflow: hidden; display: block; width: {{ pasting.iframe_width }}px; height: {{ pasting.iframe_height }}px;"><p><a href="http://{{ site.domain }}{{ pasting.get_iframe_url }}" target="_blank">View {{ pasting.tweet.author.username }}&rsquo;s tweet</a></p></iframe>

Traceback Switch to copy-and-paste view

  • /usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py in get_response
    1. # Apply view middleware
    2. for middleware_method in self._view_middleware:
    3. response = middleware_method(request, callback, callback_args, callback_kwargs)
    4. if response:
    5. return response
    6. try:
    1. response = callback(request, *callback_args, **callback_kwargs) ...
    1. except Exception, e:
    2. # If the view raised an exception, run it through exception
    3. # middleware, and if the exception middleware returns a
    4. # response, use that. Otherwise, reraise the exception.
    5. for middleware_method in self._exception_middleware:
    6. response = middleware_method(request, e)
    Variable Value
    callback
    <function get_html at 0xb86ae8b4>
    callback_args
    ()
    callback_kwargs
    {}
    e
    TemplateSyntaxError(u'Caught DatabaseError while rendering: (144, "Table \'./thingamaweb/tweets_twitterer\' is marked as crashed and last (automatic?) repair failed")',)
    exceptions
    <module 'django.core.exceptions' from '/usr/local/lib/python2.6/dist-packages/django/core/exceptions.pyc'>
    middleware_method
    <bound method AuthenticationMiddleware.process_request of <django.contrib.auth.middleware.AuthenticationMiddleware object at 0xb833e48c>>
    receivers
    [(<function _rollback_on_exception at 0xb83e9cdc>, None)]
    request
    <WSGIRequest GET:<QueryDict: {u'iframe_width': [u'354'], u'id': [u'10238807054']}>, POST:<QueryDict: {}>, COOKIES:{}, META:{'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_HOST': 'tweetpaste.thingamaweb.com', 'HTTP_USER_AGENT': 'Python-urllib/1.17', 'PATH': '/usr/local/bin:/usr/bin:/bin', 'PATH_INFO': u'/api/gethtml/', 'PATH_TRANSLATED': '/web/sites/thingamaweb.com/tweetpaste.wsgi/api/gethtml/', 'QUERY_STRING': 'iframe_width=354&id=10238807054', 'REMOTE_ADDR': '89.16.175.177', 'REMOTE_PORT': '59386', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/api/gethtml/?iframe_width=354&id=10238807054', 'SCRIPT_FILENAME': '/web/sites/thingamaweb.com/tweetpaste.wsgi', 'SCRIPT_NAME': u'', 'SERVER_ADDR': '89.16.175.177', 'SERVER_ADMIN': '[no address given]', 'SERVER_NAME': 'tweetpaste.thingamaweb.com', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SIGNATURE': '<address>Apache/2.2.12 (Ubuntu) Server at tweetpaste.thingamaweb.com Port 80</address> ', 'SERVER_SOFTWARE': 'Apache/2.2.12 (Ubuntu)', 'mod_wsgi.application_group': 'tweetpaste.thingamaweb.com|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '80', 'mod_wsgi.process_group': 'tweetpaste', 'mod_wsgi.reload_mechanism': '1', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (2, 5), 'wsgi.errors': <mod_wsgi.Log object at 0xb8719dd0>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb8704c38>, 'wsgi.input': <mod_wsgi.Input object at 0xb8701d90>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
    resolver
    <RegexURLResolver tweetpaste.urls (None:None) ^/>
    response
    None
    self
    <django.core.handlers.wsgi.WSGIHandler object at 0xb801016c>
    settings
    <django.conf.LazySettings object at 0xb81cd34c>
    urlconf
    'tweetpaste.urls'
    urlresolvers
    <module 'django.core.urlresolvers' from '/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.pyc'>
  • /web/sites/thingamaweb.com/tweetpaste/tweets/views.py in get_html
    1. include_padding = include_padding,
    2. show_username = show_username,
    3. show_source = show_source,
    4. posted_via_api = True
    5. )
    6. return HttpResponse(
    1. content = pasting.get_javascript(), ...
    1. mimetype = 'text/plain'
    2. )
    3. else:
    4. raise Http404('No tweet found with ID ' + str(id))
    Variable Value
    iframe_height
    200
    iframe_width
    354
    include_padding
    True
    pasting
    <Pasting: 10238807054>
    request
    <WSGIRequest GET:<QueryDict: {u'iframe_width': [u'354'], u'id': [u'10238807054']}>, POST:<QueryDict: {}>, COOKIES:{}, META:{'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_HOST': 'tweetpaste.thingamaweb.com', 'HTTP_USER_AGENT': 'Python-urllib/1.17', 'PATH': '/usr/local/bin:/usr/bin:/bin', 'PATH_INFO': u'/api/gethtml/', 'PATH_TRANSLATED': '/web/sites/thingamaweb.com/tweetpaste.wsgi/api/gethtml/', 'QUERY_STRING': 'iframe_width=354&id=10238807054', 'REMOTE_ADDR': '89.16.175.177', 'REMOTE_PORT': '59386', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/api/gethtml/?iframe_width=354&id=10238807054', 'SCRIPT_FILENAME': '/web/sites/thingamaweb.com/tweetpaste.wsgi', 'SCRIPT_NAME': u'', 'SERVER_ADDR': '89.16.175.177', 'SERVER_ADMIN': '[no address given]', 'SERVER_NAME': 'tweetpaste.thingamaweb.com', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SIGNATURE': '<address>Apache/2.2.12 (Ubuntu) Server at tweetpaste.thingamaweb.com Port 80</address> ', 'SERVER_SOFTWARE': 'Apache/2.2.12 (Ubuntu)', 'mod_wsgi.application_group': 'tweetpaste.thingamaweb.com|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '80', 'mod_wsgi.process_group': 'tweetpaste', 'mod_wsgi.reload_mechanism': '1', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (2, 5), 'wsgi.errors': <mod_wsgi.Log object at 0xb8719dd0>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb8704c38>, 'wsgi.input': <mod_wsgi.Input object at 0xb8701d90>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
    show_background
    True
    show_source
    True
    show_username
    True
    tweet
    <Tweet: 10238807054>
    tweet_id
    10238807054L
  • /web/sites/thingamaweb.com/tweetpaste/tweets/models.py in get_javascript
    1. def get_javascript(self):
    2. html = '<script type="text/javascript" src="http://{{ site.domain }}{{ url }}"></script><noscript>{{ code }}</noscript>'
    3. context = Context(
    4. {
    5. 'url': reverse('tweetpaste.tweets.views.iframe_js', args = [self.id]),
    6. 'site': Site.objects.get(pk = settings.SITE_ID),
    1. 'code': self.get_iframe_code() ...
    1. }
    2. )
    3. template = Template(html)
    4. return template.render(context)
    Variable Value
    html
    '<script type="text/javascript" src="http://{{ site.domain }}{{ url }}"></script><noscript>{{ code }}</noscript>'
    self
    <Pasting: 10238807054>
  • /web/sites/thingamaweb.com/tweetpaste/tweets/models.py in get_iframe_code
    1. {
    2. 'pasting': self,
    3. 'site': Site.objects.get(pk = settings.SITE_ID)
    4. }
    5. )
    6. template = Template(html)
    1. return template.render(context) ...
    1. def get_shortcode(self):
    2. params = {}
    3. if self.iframe_width <> settings.IFRAME_WIDTH:
    4. params['iframe_width'] = self.iframe_width
    Variable Value
    context
    [{'pasting': <Pasting: 10238807054>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    html
    '<iframe name="tp{{ pasting.id }}" id="tp{{ pasting.id }}" width="{{ pasting.iframe_width }}" height="{{ pasting.iframe_height }}" frameborder="0" src="http://{{ site.domain }}{{ pasting.get_iframe_url }}" style="overflow: hidden; display: block; width: {{ pasting.iframe_width }}px; height: {{ pasting.iframe_height }}px;"><p><a href="http://{{ site.domain }}{{ pasting.get_iframe_url }}" target="_blank">View {{ pasting.tweet.author.username }}&rsquo;s tweet</a></p></iframe>'
    self
    <Pasting: 10238807054>
    template
    <django.template.Template object at 0xb8782acc>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in render
    1. def _render(self, context):
    2. return self.nodelist.render(context)
    3. def render(self, context):
    4. "Display stage -- can be called many times"
    5. context.render_context.push()
    6. try:
    1. return self._render(context) ...
    1. finally:
    2. context.render_context.pop()
    3. def compile_string(template_string, origin):
    4. "Compiles template_string into NodeList ready for rendering"
    5. if settings.TEMPLATE_DEBUG:
    Variable Value
    context
    [{'pasting': <Pasting: 10238807054>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    self
    <django.template.Template object at 0xb8782acc>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in _render
    1. def __iter__(self):
    2. for node in self.nodelist:
    3. for subnode in node:
    4. yield subnode
    5. def _render(self, context):
    1. return self.nodelist.render(context) ...
    1. def render(self, context):
    2. "Display stage -- can be called many times"
    3. context.render_context.push()
    4. try:
    5. return self._render(context)
    Variable Value
    context
    [{'pasting': <Pasting: 10238807054>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    self
    <django.template.Template object at 0xb8782acc>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in render
    1. # extend_nodelist().
    2. contains_nontext = False
    3. def render(self, context):
    4. bits = []
    5. for node in self:
    6. if isinstance(node, Node):
    1. bits.append(self.render_node(node, context)) ...
    1. else:
    2. bits.append(node)
    3. return mark_safe(''.join([force_unicode(b) for b in bits]))
    4. def get_nodes_by_type(self, nodetype):
    5. "Return a list of all nodes of the given type"
    Variable Value
    bits
    [u'<iframe name="tp', u'158138', u'" id="tp', u'158138', u'" width="', u'354', u'" height="', u'200', u'" frameborder="0" src="http://', u'tweetpaste.thingamaweb.com', u'/embed/158138/', u'" style="overflow: hidden; display: block; width: ', u'354', u'px; height: ', u'200', u'px;"><p><a href="http://', u'tweetpaste.thingamaweb.com', u'/embed/158138/', u'" target="_blank">View ']
    context
    [{'pasting': <Pasting: 10238807054>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    node
    <Variable Node: pasting.tweet.author.username>
    self
    [<Text Node: '<iframe name="tp'>, <Variable Node: pasting.id>, <Text Node: '" id="tp'>, <Variable Node: pasting.id>, <Text Node: '" width="'>, <Variable Node: pasting.iframe_width>, <Text Node: '" height="'>, <Variable Node: pasting.iframe_height>, <Text Node: '" frameborder="0" src="ht'>, <Variable Node: site.domain>, <Variable Node: pasting.get_iframe_url>, <Text Node: '" style="overflow: hidden'>, <Variable Node: pasting.iframe_width>, <Text Node: 'px; height: '>, <Variable Node: pasting.iframe_height>, <Text Node: 'px;"><p><a href="http://'>, <Variable Node: site.domain>, <Variable Node: pasting.get_iframe_url>, <Text Node: '" target="_blank">View '>, <Variable Node: pasting.tweet.author.username>, <Text Node: '&rsquo;s tweet</a></p></i'>]
  • /usr/local/lib/python2.6/dist-packages/django/template/debug.py in render_node
    1. def compile_function_error(self, token, e):
    2. if not hasattr(e, 'source'):
    3. e.source = token.source
    4. class DebugNodeList(NodeList):
    5. def render_node(self, node, context):
    6. try:
    1. result = node.render(context) ...
    1. except TemplateSyntaxError, e:
    2. if not hasattr(e, 'source'):
    3. e.source = node.source
    4. raise
    5. except Exception, e:
    6. from sys import exc_info
    Variable Value
    context
    [{'pasting': <Pasting: 10238807054>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    e
    DatabaseError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
    exc_info
    <built-in function exc_info>
    node
    <Variable Node: pasting.tweet.author.username>
    self
    [<Text Node: '<iframe name="tp'>, <Variable Node: pasting.id>, <Text Node: '" id="tp'>, <Variable Node: pasting.id>, <Text Node: '" width="'>, <Variable Node: pasting.iframe_width>, <Text Node: '" height="'>, <Variable Node: pasting.iframe_height>, <Text Node: '" frameborder="0" src="ht'>, <Variable Node: site.domain>, <Variable Node: pasting.get_iframe_url>, <Text Node: '" style="overflow: hidden'>, <Variable Node: pasting.iframe_width>, <Text Node: 'px; height: '>, <Variable Node: pasting.iframe_height>, <Text Node: 'px;"><p><a href="http://'>, <Variable Node: site.domain>, <Variable Node: pasting.get_iframe_url>, <Text Node: '" target="_blank">View '>, <Variable Node: pasting.tweet.author.username>, <Text Node: '&rsquo;s tweet</a></p></i'>]
    wrapped
    TemplateSyntaxError(u'Caught DatabaseError while rendering: (144, "Table \'./thingamaweb/tweets_twitterer\' is marked as crashed and last (automatic?) repair failed")',)
  • /usr/local/lib/python2.6/dist-packages/django/template/debug.py in render
    1. wrapped.exc_info = exc_info()
    2. raise wrapped, None, wrapped.exc_info[2]
    3. return result
    4. class DebugVariableNode(VariableNode):
    5. def render(self, context):
    6. try:
    1. output = self.filter_expression.resolve(context) ...
    1. output = localize(output)
    2. output = force_unicode(output)
    3. except TemplateSyntaxError, e:
    4. if not hasattr(e, 'source'):
    5. e.source = self.source
    6. raise
    Variable Value
    context
    [{'pasting': <Pasting: 10238807054>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    self
    <Variable Node: pasting.tweet.author.username>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in resolve
    1. self.filters = filters
    2. self.var = var_obj
    3. def resolve(self, context, ignore_failures=False):
    4. if isinstance(self.var, Variable):
    5. try:
    1. obj = self.var.resolve(context) ...
    1. except VariableDoesNotExist:
    2. if ignore_failures:
    3. obj = None
    4. else:
    5. if settings.TEMPLATE_STRING_IF_INVALID:
    6. global invalid_var_format_string
    Variable Value
    context
    [{'pasting': <Pasting: 10238807054>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    ignore_failures
    False
    self
    <django.template.FilterExpression object at 0xb87af96c>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in resolve
    1. raise TemplateSyntaxError("Variables and attributes may not begin with underscores: '%s'" % var)
    2. self.lookups = tuple(var.split(VARIABLE_ATTRIBUTE_SEPARATOR))
    3. def resolve(self, context):
    4. """Resolve this variable against a given context."""
    5. if self.lookups is not None:
    6. # We're dealing with a variable that needs to be resolved
    1. value = self._resolve_lookup(context) ...
    1. else:
    2. # We're dealing with a literal, so it's already been "resolved"
    3. value = self.literal
    4. if self.translate:
    5. return _(value)
    6. return value
    Variable Value
    context
    [{'pasting': <Pasting: 10238807054>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    self
    <Variable: u'pasting.tweet.author.username'>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in _resolve_lookup
    1. """
    2. current = context
    3. for bit in self.lookups:
    4. try: # dictionary lookup
    5. current = current[bit]
    6. except (TypeError, AttributeError, KeyError):
    7. try: # attribute lookup
    1. current = getattr(current, bit) ...
    1. if callable(current):
    2. if getattr(current, 'alters_data', False):
    3. current = settings.TEMPLATE_STRING_IF_INVALID
    4. else:
    5. try: # method call (assuming no args required)
    6. current = current()
    Variable Value
    bit
    u'author'
    context
    [{'pasting': <Pasting: 10238807054>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    current
    <Tweet: 10238807054>
    e
    DatabaseError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
    self
    <Variable: u'pasting.tweet.author.username'>
  • /usr/local/lib/python2.6/dist-packages/django/db/models/fields/related.py in __get__
    1. # If the related manager indicates that it should be used for
    2. # related fields, respect that.
    3. rel_mgr = self.field.rel.to._default_manager
    4. db = router.db_for_read(self.field.rel.to, instance=instance)
    5. if getattr(rel_mgr, 'use_for_related_fields', False):
    6. rel_obj = rel_mgr.using(db).get(**params)
    7. else:
    1. rel_obj = QuerySet(self.field.rel.to).using(db).get(**params) ...
    1. setattr(instance, cache_name, rel_obj)
    2. return rel_obj
    3. def __set__(self, instance, value):
    4. if instance is None:
    5. raise AttributeError("%s must be accessed via instance" % self._field.name)
    Variable Value
    cache_name
    '_author_cache'
    db
    'default'
    instance
    <Tweet: 10238807054>
    instance_type
    <class 'tweetpaste.tweets.models.Tweet'>
    other_field
    <django.db.models.fields.AutoField object at 0xb869e38c>
    params
    {'id__exact': 30L}
    rel_mgr
    <django.db.models.manager.Manager object at 0xb869e3ac>
    self
    <django.db.models.fields.related.ReverseSingleRelatedObjectDescriptor object at 0xb869e8ec>
    val
    30L
  • /usr/local/lib/python2.6/dist-packages/django/db/models/query.py in get
    1. """
    2. Performs the query and returns a single object matching the given
    3. keyword arguments.
    4. """
    5. clone = self.filter(*args, **kwargs)
    6. if self.query.can_filter():
    7. clone = clone.order_by()
    1. num = len(clone) ...
    1. if num == 1:
    2. return clone._result_cache[0]
    3. if not num:
    4. raise self.model.DoesNotExist("%s matching query does not exist."
    5. % self.model._meta.object_name)
    6. raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"
    Variable Value
    args
    ()
    clone
    Error in formatting: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
    kwargs
    {'id__exact': 30L}
    self
    Error in formatting: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
  • /usr/local/lib/python2.6/dist-packages/django/db/models/query.py in __len__
    1. # Since __len__ is called quite frequently (for example, as part of
    2. # list(qs), we make some effort here to be as efficient as possible
    3. # whilst not messing up any existing iterators against the QuerySet.
    4. if self._result_cache is None:
    5. if self._iter:
    6. self._result_cache = list(self._iter)
    7. else:
    1. self._result_cache = list(self.iterator()) ...
    1. elif self._iter:
    2. self._result_cache.extend(list(self._iter))
    3. return len(self._result_cache)
    4. def __iter__(self):
    5. if self._result_cache is None:
    Variable Value
    self
    Error in formatting: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
  • /usr/local/lib/python2.6/dist-packages/django/db/models/query.py in iterator
    1. if field.name not in load_fields:
    2. skip.add(field.attname)
    3. else:
    4. init_list.append(field.attname)
    5. model_cls = deferred_class_factory(self.model, skip)
    6. compiler = self.query.get_compiler(using=self.db)
    1. for row in compiler.results_iter(): ...
    1. if fill_cache:
    2. obj, _ = get_cached_row(self.model, row,
    3. index_start, using=self.db, max_depth=max_depth,
    4. requested=requested, offset=len(aggregate_select),
    5. only_load=only_load)
    6. else:
    Variable Value
    aggregate_select
    []
    aggregate_start
    8
    compiler
    <django.db.backends.mysql.compiler.SQLCompiler object at 0xb8785e2c>
    extra_select
    []
    fields
    [<django.db.models.fields.AutoField object at 0xb869e38c>, <django.db.models.fields.PositiveIntegerField object at 0xb864eb8c>, <django.db.models.fields.CharField object at 0xb864ec0c>, <django.db.models.fields.CharField object at 0xb864eccc>, <django.db.models.fields.URLField object at 0xb865478c>, <django.db.models.fields.CharField object at 0xb868d60c>, <django.db.models.fields.URLField object at 0xb868d66c>, <django.db.models.fields.DateTimeField object at 0xb868d7cc>]
    fill_cache
    False
    index_start
    0
    load_fields
    []
    max_depth
    5
    only_load
    {}
    pk_idx
    0
    requested
    None
    self
    Error in formatting: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
    skip
    None
  • /usr/local/lib/python2.6/dist-packages/django/db/models/sql/compiler.py in results_iter
    1. def results_iter(self):
    2. """
    3. Returns an iterator over the results from executing this query.
    4. """
    5. resolve_columns = hasattr(self, 'resolve_columns')
    6. fields = None
    1. for rows in self.execute_sql(MULTI): ...
    1. for row in rows:
    2. if resolve_columns:
    3. if fields is None:
    4. # We only set this up here because
    5. # related_select_fields isn't populated until
    6. # execute_sql() has been called.
    Variable Value
    fields
    None
    resolve_columns
    True
    self
    <django.db.backends.mysql.compiler.SQLCompiler object at 0xb8785e2c>
  • /usr/local/lib/python2.6/dist-packages/django/db/models/sql/compiler.py in execute_sql
    1. except EmptyResultSet:
    2. if result_type == MULTI:
    3. return empty_iter()
    4. else:
    5. return
    6. cursor = self.connection.cursor()
    1. cursor.execute(sql, params) ...
    1. if not result_type:
    2. return cursor
    3. if result_type == SINGLE:
    4. if self.query.ordering_aliases:
    5. return cursor.fetchone()[:-len(self.query.ordering_aliases)]
    Variable Value
    cursor
    <django.db.backends.util.CursorDebugWrapper object at 0xb8796ecc>
    params
    (30,)
    result_type
    'multi'
    self
    <django.db.backends.mysql.compiler.SQLCompiler object at 0xb8785e2c>
    sql
    'SELECT `tweets_twitterer`.`id`, `tweets_twitterer`.`user_id`, `tweets_twitterer`.`username`, `tweets_twitterer`.`display_name`, `tweets_twitterer`.`image_url`, `tweets_twitterer`.`background_colour`, `tweets_twitterer`.`url`, `tweets_twitterer`.`date_updated` FROM `tweets_twitterer` WHERE `tweets_twitterer`.`id` = %s '
  • /usr/local/lib/python2.6/dist-packages/django/db/backends/util.py in execute
    1. def __init__(self, cursor, db):
    2. self.cursor = cursor
    3. self.db = db # Instance of a BaseDatabaseWrapper subclass
    4. def execute(self, sql, params=()):
    5. start = time()
    6. try:
    1. return self.cursor.execute(sql, params) ...
    1. finally:
    2. stop = time()
    3. sql = self.db.ops.last_executed_query(self.cursor, sql, params)
    4. self.db.queries.append({
    5. 'sql': sql,
    6. 'time': "%.3f" % (stop - start),
    Variable Value
    params
    (30,)
    self
    <django.db.backends.util.CursorDebugWrapper object at 0xb8796ecc>
    sql
    u'SELECT `tweets_twitterer`.`id`, `tweets_twitterer`.`user_id`, `tweets_twitterer`.`username`, `tweets_twitterer`.`display_name`, `tweets_twitterer`.`image_url`, `tweets_twitterer`.`background_colour`, `tweets_twitterer`.`url`, `tweets_twitterer`.`date_updated` FROM `tweets_twitterer` WHERE `tweets_twitterer`.`id` = 30 '
    start
    1280583158.268383
    stop
    1280583158.269753
  • /usr/local/lib/python2.6/dist-packages/django/db/backends/mysql/base.py in execute
    1. codes_for_integrityerror = (1048,)
    2. def __init__(self, cursor):
    3. self.cursor = cursor
    4. def execute(self, query, args=None):
    5. try:
    1. return self.cursor.execute(query, args) ...
    1. except Database.IntegrityError, e:
    2. raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
    3. except Database.OperationalError, e:
    4. # Map some error codes to IntegrityError, since they seem to be
    5. # misclassified and Django would prefer the more logical place.
    6. if e[0] in self.codes_for_integrityerror:
    Variable Value
    args
    (30,)
    e
    InternalError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
    query
    'SELECT `tweets_twitterer`.`id`, `tweets_twitterer`.`user_id`, `tweets_twitterer`.`username`, `tweets_twitterer`.`display_name`, `tweets_twitterer`.`image_url`, `tweets_twitterer`.`background_colour`, `tweets_twitterer`.`url`, `tweets_twitterer`.`date_updated` FROM `tweets_twitterer` WHERE `tweets_twitterer`.`id` = %s '
    self
    <django.db.backends.mysql.base.CursorWrapper object at 0xb87aa7ac>
  • /usr/lib/pymodules/python2.6/MySQLdb/cursors.py in execute
    1. else:
    2. self.messages.append((TypeError, m))
    3. self.errorhandler(self, TypeError, m)
    4. except:
    5. exc, value, tb = exc_info()
    6. del tb
    7. self.messages.append((exc, value))
    1. self.errorhandler(self, exc, value) ...
    1. self._executed = query
    2. if not self._defer_warnings: self._warning_check()
    3. return r
    4. def executemany(self, query, args):
    Variable Value
    ListType
    <type 'list'>
    TupleType
    <type 'tuple'>
    args
    (30,)
    charset
    'utf8'
    db
    <weakproxy at 0xb88a22d4 to Connection at 0xb8871484>
    exc
    <class '_mysql_exceptions.InternalError'>
    exc_info
    <built-in function exc_info>
    query
    'SELECT `tweets_twitterer`.`id`, `tweets_twitterer`.`user_id`, `tweets_twitterer`.`username`, `tweets_twitterer`.`display_name`, `tweets_twitterer`.`image_url`, `tweets_twitterer`.`background_colour`, `tweets_twitterer`.`url`, `tweets_twitterer`.`date_updated` FROM `tweets_twitterer` WHERE `tweets_twitterer`.`id` = 30 '
    self
    <MySQLdb.cursors.Cursor object at 0xb87aaa8c>
    value
    InternalError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
  • /usr/lib/pymodules/python2.6/MySQLdb/connections.py in defaulterrorhandler
    1. error = errorclass, errorvalue
    2. if cursor:
    3. cursor.messages.append(error)
    4. else:
    5. connection.messages.append(error)
    6. del cursor
    7. del connection
    1. raise errorclass, errorvalue ...
    1. class Connection(_mysql.connection):
    2. """MySQL Database Connection Object"""
    Variable Value
    error
    (<class '_mysql_exceptions.InternalError'>, InternalError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed"))
    errorclass
    <class '_mysql_exceptions.InternalError'>
    errorvalue
    InternalError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")


Request information

GET

Variable Value
iframe_width
u'354'
id
u'10238807054'

POST

No POST data

FILES

No FILES data

No cookie data

META

Variable Value
DOCUMENT_ROOT
'/var/www'
GATEWAY_INTERFACE
'CGI/1.1'
HTTP_HOST
'tweetpaste.thingamaweb.com'
HTTP_USER_AGENT
'Python-urllib/1.17'
PATH
'/usr/local/bin:/usr/bin:/bin'
PATH_INFO
u'/api/gethtml/'
PATH_TRANSLATED
'/web/sites/thingamaweb.com/tweetpaste.wsgi/api/gethtml/'
QUERY_STRING
'iframe_width=354&id=10238807054'
REMOTE_ADDR
'89.16.175.177'
REMOTE_PORT
'59386'
REQUEST_METHOD
'GET'
REQUEST_URI
'/api/gethtml/?iframe_width=354&id=10238807054'
SCRIPT_FILENAME
'/web/sites/thingamaweb.com/tweetpaste.wsgi'
SCRIPT_NAME
u''
SERVER_ADDR
'89.16.175.177'
SERVER_ADMIN
'[no address given]'
SERVER_NAME
'tweetpaste.thingamaweb.com'
SERVER_PORT
'80'
SERVER_PROTOCOL
'HTTP/1.0'
SERVER_SIGNATURE
'<address>Apache/2.2.12 (Ubuntu) Server at tweetpaste.thingamaweb.com Port 80</address> '
SERVER_SOFTWARE
'Apache/2.2.12 (Ubuntu)'
mod_wsgi.application_group
'tweetpaste.thingamaweb.com|'
mod_wsgi.callable_object
'application'
mod_wsgi.listener_host
''
mod_wsgi.listener_port
'80'
mod_wsgi.process_group
'tweetpaste'
mod_wsgi.reload_mechanism
'1'
mod_wsgi.script_reloading
'1'
mod_wsgi.version
(2, 5)
wsgi.errors
<mod_wsgi.Log object at 0xb8719dd0>
wsgi.file_wrapper
<built-in method file_wrapper of mod_wsgi.Adapter object at 0xb8704c38>
wsgi.input
<mod_wsgi.Input object at 0xb8701d90>
wsgi.multiprocess
True
wsgi.multithread
False
wsgi.run_once
False
wsgi.url_scheme
'http'
wsgi.version
(1, 0)

Settings

Using settings module tweetpaste.settings

Setting Value
ABSOLUTE_URL_OVERRIDES
{}
ADMINS
(('Mark Steadman', 'marksteadman@me.com'),)
ADMIN_FOR
()
ADMIN_MEDIA_PREFIX
'/media/'
ALLOWED_INCLUDE_ROOTS
()
APPEND_SLASH
True
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',)
BANNED_IPS
()
BITLY_API_KEY
'R_2ad0cc5f01036b6f4f07e5542aa7a833'
BITLY_USERNAME
'tweetpastebot'
CACHE_BACKEND
'locmem://'
CACHE_MIDDLEWARE_KEY_PREFIX
''
CACHE_MIDDLEWARE_SECONDS
600
COMMENTS_ALLOW_PROFANITIES
False
COMMENTS_BANNED_USERS_GROUP
None
COMMENTS_FIRST_FEW
0
COMMENTS_MODERATORS_GROUP
None
COMMENTS_SKETCHY_USERS_GROUP
None
CSRF_COOKIE_DOMAIN
None
CSRF_COOKIE_NAME
'csrftoken'
CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure'
DATABASES
{'default': {'ENGINE': 'django.db.backends.mysql', 'HOST': '', 'NAME': 'thingamaweb', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'Europe/London', 'USER': 'thingamaweb'}}
DATABASE_ENGINE
'mysql'
DATABASE_HOST
''
DATABASE_NAME
'thingamaweb'
DATABASE_OPTIONS
{}
DATABASE_PASSWORD
'********************'
DATABASE_PORT
''
DATABASE_ROUTERS
[]
DATABASE_USER
'thingamaweb'
DATETIME_FORMAT
'N j, Y, P'
DATETIME_INPUT_FORMATS
('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M', '%m/%d/%y')
DATE_FORMAT
'N j, Y'
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')
DEBUG
True
DEBUG_PROPAGATE_EXCEPTIONS
False
DECIMAL_SEPARATOR
'.'
DEFAULT_CHARSET
'utf-8'
DEFAULT_CONTENT_TYPE
'text/html'
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL
'info@thingamaweb.com'
DEFAULT_INDEX_TABLESPACE
''
DEFAULT_TABLESPACE
''
DISALLOWED_USER_AGENTS
()
EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST
'localhost'
EMAIL_HOST_PASSWORD
'********************'
EMAIL_HOST_USER
''
EMAIL_PORT
25
EMAIL_SUBJECT_PREFIX
'TweetPaste: '
EMAIL_USE_TLS
False
FILE_CHARSET
'utf-8'
FILE_UPLOAD_HANDLERS
('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler')
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
FILE_UPLOAD_PERMISSIONS
None
FILE_UPLOAD_TEMP_DIR
None
FIRST_DAY_OF_WEEK
0
FIXTURE_DIRS
()
FORCE_SCRIPT_NAME
None
FORMAT_MODULE_PATH
None
GOOGLE_ANALYTICS_ACCOUNTS
['UA-9869007-5']
IFRAME_HEIGHT
200
IFRAME_WIDTH
500
IGNORABLE_404_ENDS
('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')
IGNORABLE_404_STARTS
('/cgi-bin/', '/_vti_bin', '/_vti_inf')
INSTALLED_APPS
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'tweetpaste.core', 'tweetpaste.tweets', 'djangles.googleanalytics']
INTERNAL_IPS
()
LANGUAGES
(('ar', 'Arabic'), ('bg', 'Bulgarian'), ('bn', 'Bengali'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('es', 'Spanish'), ('es-ar', 'Argentinean Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('mn', 'Mongolian'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('nb', 'Norwegian Bokmal'), ('nn', 'Norwegian Nynorsk'), ('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'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('uk', 'Ukrainian'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese'))
LANGUAGES_BIDI
('he', 'ar', 'fa')
LANGUAGE_CODE
'en-GB'
LANGUAGE_COOKIE_NAME
'django_language'
LOCALE_PATHS
()
LOGIN_REDIRECT_URL
'/accounts/profile/'
LOGIN_URL
'/accounts/login/'
LOGOUT_URL
'/accounts/logout/'
MANAGERS
(('Mark Steadman', 'marksteadman@me.com'),)
MEDIA_ROOT
'/web/sites/thingamaweb.com/media/'
MEDIA_URL
'http://media.thingamaweb.com/'
MESSAGE_STORAGE
'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'
MIDDLEWARE_CLASSES
('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware')
MONTH_DAY_FORMAT
'F j'
NUMBER_GROUPING
0
PASSWORD_RESET_TIMEOUT_DAYS
'********************'
PREPEND_WWW
False
PROFANITIES_LIST
'********************'
ROOT_URLCONF
'tweetpaste.urls'
SECRET_KEY
'********************'
SEND_BROKEN_LINK_EMAILS
False
SERVER_EMAIL
'info@thingamaweb.com'
SESSION_COOKIE_AGE
1209600
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_NAME
'sessionid'
SESSION_COOKIE_PATH
'/'
SESSION_COOKIE_SECURE
False
SESSION_ENGINE
'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
SESSION_FILE_PATH
None
SESSION_SAVE_EVERY_REQUEST
False
SETTINGS_MODULE
'tweetpaste.settings'
SHORT_DATETIME_FORMAT
'm/d/Y P'
SHORT_DATE_FORMAT
'm/d/Y'
SITE_DESCRIPTION
'Embed tweets into your Website or blog'
SITE_ID
1
SITE_LOGO_URL
'http://media.thingamaweb.com/tweetpaste/img/logo.jpg'
SITE_NAME
'TweetPaste'
TEMPLATE_CONTEXT_PROCESSORS
('django.core.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.request', 'tweetpaste.core.context_processors.settings', 'tweetpaste.tweets.context_processors.tweets')
TEMPLATE_DEBUG
True
TEMPLATE_DIRS
('/web/sites/thingamaweb.com/tweetpaste/templates/', '/web/sites/thingamaweb.com/templates/')
TEMPLATE_LOADERS
('django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source')
TEMPLATE_STRING_IF_INVALID
''
TEST_DATABASE_CHARSET
None
TEST_DATABASE_COLLATION
None
TEST_DATABASE_NAME
None
TEST_RUNNER
'django.test.simple.DjangoTestSuiteRunner'
THOUSAND_SEPARATOR
','
TIME_FORMAT
'P'
TIME_INPUT_FORMATS
('%H:%M:%S', '%H:%M')
TIME_ZONE
'Europe/London'
TRANSACTIONS_MANAGED
False
TWEET_REGEX
'^(http(s)?://)?(www\.)?twitter\.com/(?P<username>(\w*))/status(es)?/(?P<id>(\d*))(/)?$'
TWITTER_BOT_PASSWORD
'********************'
TWITTER_BOT_USERNAME
'tweetpastebot'
TWITTER_PASSWORD
'********************'
TWITTER_USERNAME
'tweetpaste'
URL_VALIDATOR_USER_AGENT
'Django/1.3 pre-alpha (http://www.djangoproject.com)'
USE_ETAGS
False
USE_I18N
True
USE_L10N
False
USE_THOUSAND_SEPARATOR
False
YEAR_MONTH_FORMAT
'F Y'

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.

When I aired this view, Pete Ashton came back with a good point (above). And I think that's certainly true when starting out on a new social network. You've got to build up your base from the people you already know and whose thoughts you think you'd enjoy. A thought echoed by Martin:

TemplateSyntaxError at /api/gethtml/

TemplateSyntaxError at /api/gethtml/

Caught DatabaseError while rendering: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
Request Method: GET
Request URL: http://tweetpaste.thingamaweb.com/api/gethtml/?iframe_width=354&id=10239175359
Django Version: 1.3 pre-alpha
Exception Type: TemplateSyntaxError
Exception Value:
Caught DatabaseError while rendering: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
Exception Location: /usr/lib/pymodules/python2.6/MySQLdb/connections.py in defaulterrorhandler, line 35
Python Executable: /usr/bin/python
Python Version: 2.6.4
Python Path: ['/web/sites/thingamaweb.com/', '/usr/local/lib/python2.6/dist-packages/elementtree-1.2.7_20070827_preview-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/lxml-2.2.4-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/python_twitter-0.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/simplejson-2.0.9-py2.6-linux-i686.egg', '/usr/local/lib/python2.6/dist-packages/recaptcha_client-1.0.5-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Markdown-2.0.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_tracking-0.2.7-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/geopy-0.94-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Whoosh-0.3.18-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/mutagen-1.19-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/GChartWrapper-0.9-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/flickrapi-1.4.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/django_debug_toolbar-0.8.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/sorl_thumbnail-3.2.5-py2.6.egg', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/pymodules/python2.6', '/usr/local/lib/python2.6/dist-packages']
Server time: Sat, 31 Jul 2010 14:32:40 +0100

Template error

In template <unknown source>, error at line 1

Caught DatabaseError while rendering: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")

1 <iframe name="tp{{ pasting.id }}" id="tp{{ pasting.id }}" width="{{ pasting.iframe_width }}" height="{{ pasting.iframe_height }}" frameborder="0" src="http://{{ site.domain }}{{ pasting.get_iframe_url }}" style="overflow: hidden; display: block; width: {{ pasting.iframe_width }}px; height: {{ pasting.iframe_height }}px;"><p><a href="http://{{ site.domain }}{{ pasting.get_iframe_url }}" target="_blank">View {{ pasting.tweet.author.username }}&rsquo;s tweet</a></p></iframe>

Traceback Switch to copy-and-paste view

  • /usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py in get_response
    1. # Apply view middleware
    2. for middleware_method in self._view_middleware:
    3. response = middleware_method(request, callback, callback_args, callback_kwargs)
    4. if response:
    5. return response
    6. try:
    1. response = callback(request, *callback_args, **callback_kwargs) ...
    1. except Exception, e:
    2. # If the view raised an exception, run it through exception
    3. # middleware, and if the exception middleware returns a
    4. # response, use that. Otherwise, reraise the exception.
    5. for middleware_method in self._exception_middleware:
    6. response = middleware_method(request, e)
    Variable Value
    callback
    <function get_html at 0xb86ae87c>
    callback_args
    ()
    callback_kwargs
    {}
    e
    TemplateSyntaxError(u'Caught DatabaseError while rendering: (144, "Table \'./thingamaweb/tweets_twitterer\' is marked as crashed and last (automatic?) repair failed")',)
    exceptions
    <module 'django.core.exceptions' from '/usr/local/lib/python2.6/dist-packages/django/core/exceptions.pyc'>
    middleware_method
    <bound method AuthenticationMiddleware.process_request of <django.contrib.auth.middleware.AuthenticationMiddleware object at 0xb833e48c>>
    receivers
    [(<function _rollback_on_exception at 0xb83e9cdc>, None)]
    request
    <WSGIRequest GET:<QueryDict: {u'iframe_width': [u'354'], u'id': [u'10239175359']}>, POST:<QueryDict: {}>, COOKIES:{}, META:{'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_HOST': 'tweetpaste.thingamaweb.com', 'HTTP_USER_AGENT': 'Python-urllib/1.17', 'PATH': '/usr/local/bin:/usr/bin:/bin', 'PATH_INFO': u'/api/gethtml/', 'PATH_TRANSLATED': '/web/sites/thingamaweb.com/tweetpaste.wsgi/api/gethtml/', 'QUERY_STRING': 'iframe_width=354&id=10239175359', 'REMOTE_ADDR': '89.16.175.177', 'REMOTE_PORT': '59387', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/api/gethtml/?iframe_width=354&id=10239175359', 'SCRIPT_FILENAME': '/web/sites/thingamaweb.com/tweetpaste.wsgi', 'SCRIPT_NAME': u'', 'SERVER_ADDR': '89.16.175.177', 'SERVER_ADMIN': '[no address given]', 'SERVER_NAME': 'tweetpaste.thingamaweb.com', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SIGNATURE': '<address>Apache/2.2.12 (Ubuntu) Server at tweetpaste.thingamaweb.com Port 80</address> ', 'SERVER_SOFTWARE': 'Apache/2.2.12 (Ubuntu)', 'mod_wsgi.application_group': 'tweetpaste.thingamaweb.com|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '80', 'mod_wsgi.process_group': 'tweetpaste', 'mod_wsgi.reload_mechanism': '1', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (2, 5), 'wsgi.errors': <mod_wsgi.Log object at 0xb8895848>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb86fc4a0>, 'wsgi.input': <mod_wsgi.Input object at 0xb86c2908>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
    resolver
    <RegexURLResolver tweetpaste.urls (None:None) ^/>
    response
    None
    self
    <django.core.handlers.wsgi.WSGIHandler object at 0xb801016c>
    settings
    <django.conf.LazySettings object at 0xb81cd34c>
    urlconf
    'tweetpaste.urls'
    urlresolvers
    <module 'django.core.urlresolvers' from '/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.pyc'>
  • /web/sites/thingamaweb.com/tweetpaste/tweets/views.py in get_html
    1. include_padding = include_padding,
    2. show_username = show_username,
    3. show_source = show_source,
    4. posted_via_api = True
    5. )
    6. return HttpResponse(
    1. content = pasting.get_javascript(), ...
    1. mimetype = 'text/plain'
    2. )
    3. else:
    4. raise Http404('No tweet found with ID ' + str(id))
    Variable Value
    iframe_height
    200
    iframe_width
    354
    include_padding
    True
    pasting
    <Pasting: 10239175359>
    request
    <WSGIRequest GET:<QueryDict: {u'iframe_width': [u'354'], u'id': [u'10239175359']}>, POST:<QueryDict: {}>, COOKIES:{}, META:{'DOCUMENT_ROOT': '/var/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_HOST': 'tweetpaste.thingamaweb.com', 'HTTP_USER_AGENT': 'Python-urllib/1.17', 'PATH': '/usr/local/bin:/usr/bin:/bin', 'PATH_INFO': u'/api/gethtml/', 'PATH_TRANSLATED': '/web/sites/thingamaweb.com/tweetpaste.wsgi/api/gethtml/', 'QUERY_STRING': 'iframe_width=354&id=10239175359', 'REMOTE_ADDR': '89.16.175.177', 'REMOTE_PORT': '59387', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/api/gethtml/?iframe_width=354&id=10239175359', 'SCRIPT_FILENAME': '/web/sites/thingamaweb.com/tweetpaste.wsgi', 'SCRIPT_NAME': u'', 'SERVER_ADDR': '89.16.175.177', 'SERVER_ADMIN': '[no address given]', 'SERVER_NAME': 'tweetpaste.thingamaweb.com', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SIGNATURE': '<address>Apache/2.2.12 (Ubuntu) Server at tweetpaste.thingamaweb.com Port 80</address> ', 'SERVER_SOFTWARE': 'Apache/2.2.12 (Ubuntu)', 'mod_wsgi.application_group': 'tweetpaste.thingamaweb.com|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '80', 'mod_wsgi.process_group': 'tweetpaste', 'mod_wsgi.reload_mechanism': '1', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (2, 5), 'wsgi.errors': <mod_wsgi.Log object at 0xb8895848>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb86fc4a0>, 'wsgi.input': <mod_wsgi.Input object at 0xb86c2908>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
    show_background
    True
    show_source
    True
    show_username
    True
    tweet
    <Tweet: 10239175359>
    tweet_id
    10239175359L
  • /web/sites/thingamaweb.com/tweetpaste/tweets/models.py in get_javascript
    1. def get_javascript(self):
    2. html = '<script type="text/javascript" src="http://{{ site.domain }}{{ url }}"></script><noscript>{{ code }}</noscript>'
    3. context = Context(
    4. {
    5. 'url': reverse('tweetpaste.tweets.views.iframe_js', args = [self.id]),
    6. 'site': Site.objects.get(pk = settings.SITE_ID),
    1. 'code': self.get_iframe_code() ...
    1. }
    2. )
    3. template = Template(html)
    4. return template.render(context)
    Variable Value
    html
    '<script type="text/javascript" src="http://{{ site.domain }}{{ url }}"></script><noscript>{{ code }}</noscript>'
    self
    <Pasting: 10239175359>
  • /web/sites/thingamaweb.com/tweetpaste/tweets/models.py in get_iframe_code
    1. {
    2. 'pasting': self,
    3. 'site': Site.objects.get(pk = settings.SITE_ID)
    4. }
    5. )
    6. template = Template(html)
    1. return template.render(context) ...
    1. def get_shortcode(self):
    2. params = {}
    3. if self.iframe_width <> settings.IFRAME_WIDTH:
    4. params['iframe_width'] = self.iframe_width
    Variable Value
    context
    [{'pasting': <Pasting: 10239175359>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    html
    '<iframe name="tp{{ pasting.id }}" id="tp{{ pasting.id }}" width="{{ pasting.iframe_width }}" height="{{ pasting.iframe_height }}" frameborder="0" src="http://{{ site.domain }}{{ pasting.get_iframe_url }}" style="overflow: hidden; display: block; width: {{ pasting.iframe_width }}px; height: {{ pasting.iframe_height }}px;"><p><a href="http://{{ site.domain }}{{ pasting.get_iframe_url }}" target="_blank">View {{ pasting.tweet.author.username }}&rsquo;s tweet</a></p></iframe>'
    self
    <Pasting: 10239175359>
    template
    <django.template.Template object at 0xb88755ac>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in render
    1. def _render(self, context):
    2. return self.nodelist.render(context)
    3. def render(self, context):
    4. "Display stage -- can be called many times"
    5. context.render_context.push()
    6. try:
    1. return self._render(context) ...
    1. finally:
    2. context.render_context.pop()
    3. def compile_string(template_string, origin):
    4. "Compiles template_string into NodeList ready for rendering"
    5. if settings.TEMPLATE_DEBUG:
    Variable Value
    context
    [{'pasting': <Pasting: 10239175359>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    self
    <django.template.Template object at 0xb88755ac>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in _render
    1. def __iter__(self):
    2. for node in self.nodelist:
    3. for subnode in node:
    4. yield subnode
    5. def _render(self, context):
    1. return self.nodelist.render(context) ...
    1. def render(self, context):
    2. "Display stage -- can be called many times"
    3. context.render_context.push()
    4. try:
    5. return self._render(context)
    Variable Value
    context
    [{'pasting': <Pasting: 10239175359>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    self
    <django.template.Template object at 0xb88755ac>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in render
    1. # extend_nodelist().
    2. contains_nontext = False
    3. def render(self, context):
    4. bits = []
    5. for node in self:
    6. if isinstance(node, Node):
    1. bits.append(self.render_node(node, context)) ...
    1. else:
    2. bits.append(node)
    3. return mark_safe(''.join([force_unicode(b) for b in bits]))
    4. def get_nodes_by_type(self, nodetype):
    5. "Return a list of all nodes of the given type"
    Variable Value
    bits
    [u'<iframe name="tp', u'158139', u'" id="tp', u'158139', u'" width="', u'354', u'" height="', u'200', u'" frameborder="0" src="http://', u'tweetpaste.thingamaweb.com', u'/embed/158139/', u'" style="overflow: hidden; display: block; width: ', u'354', u'px; height: ', u'200', u'px;"><p><a href="http://', u'tweetpaste.thingamaweb.com', u'/embed/158139/', u'" target="_blank">View ']
    context
    [{'pasting': <Pasting: 10239175359>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    node
    <Variable Node: pasting.tweet.author.username>
    self
    [<Text Node: '<iframe name="tp'>, <Variable Node: pasting.id>, <Text Node: '" id="tp'>, <Variable Node: pasting.id>, <Text Node: '" width="'>, <Variable Node: pasting.iframe_width>, <Text Node: '" height="'>, <Variable Node: pasting.iframe_height>, <Text Node: '" frameborder="0" src="ht'>, <Variable Node: site.domain>, <Variable Node: pasting.get_iframe_url>, <Text Node: '" style="overflow: hidden'>, <Variable Node: pasting.iframe_width>, <Text Node: 'px; height: '>, <Variable Node: pasting.iframe_height>, <Text Node: 'px;"><p><a href="http://'>, <Variable Node: site.domain>, <Variable Node: pasting.get_iframe_url>, <Text Node: '" target="_blank">View '>, <Variable Node: pasting.tweet.author.username>, <Text Node: '&rsquo;s tweet</a></p></i'>]
  • /usr/local/lib/python2.6/dist-packages/django/template/debug.py in render_node
    1. def compile_function_error(self, token, e):
    2. if not hasattr(e, 'source'):
    3. e.source = token.source
    4. class DebugNodeList(NodeList):
    5. def render_node(self, node, context):
    6. try:
    1. result = node.render(context) ...
    1. except TemplateSyntaxError, e:
    2. if not hasattr(e, 'source'):
    3. e.source = node.source
    4. raise
    5. except Exception, e:
    6. from sys import exc_info
    Variable Value
    context
    [{'pasting': <Pasting: 10239175359>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    e
    DatabaseError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
    exc_info
    <built-in function exc_info>
    node
    <Variable Node: pasting.tweet.author.username>
    self
    [<Text Node: '<iframe name="tp'>, <Variable Node: pasting.id>, <Text Node: '" id="tp'>, <Variable Node: pasting.id>, <Text Node: '" width="'>, <Variable Node: pasting.iframe_width>, <Text Node: '" height="'>, <Variable Node: pasting.iframe_height>, <Text Node: '" frameborder="0" src="ht'>, <Variable Node: site.domain>, <Variable Node: pasting.get_iframe_url>, <Text Node: '" style="overflow: hidden'>, <Variable Node: pasting.iframe_width>, <Text Node: 'px; height: '>, <Variable Node: pasting.iframe_height>, <Text Node: 'px;"><p><a href="http://'>, <Variable Node: site.domain>, <Variable Node: pasting.get_iframe_url>, <Text Node: '" target="_blank">View '>, <Variable Node: pasting.tweet.author.username>, <Text Node: '&rsquo;s tweet</a></p></i'>]
    wrapped
    TemplateSyntaxError(u'Caught DatabaseError while rendering: (144, "Table \'./thingamaweb/tweets_twitterer\' is marked as crashed and last (automatic?) repair failed")',)
  • /usr/local/lib/python2.6/dist-packages/django/template/debug.py in render
    1. wrapped.exc_info = exc_info()
    2. raise wrapped, None, wrapped.exc_info[2]
    3. return result
    4. class DebugVariableNode(VariableNode):
    5. def render(self, context):
    6. try:
    1. output = self.filter_expression.resolve(context) ...
    1. output = localize(output)
    2. output = force_unicode(output)
    3. except TemplateSyntaxError, e:
    4. if not hasattr(e, 'source'):
    5. e.source = self.source
    6. raise
    Variable Value
    context
    [{'pasting': <Pasting: 10239175359>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    self
    <Variable Node: pasting.tweet.author.username>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in resolve
    1. self.filters = filters
    2. self.var = var_obj
    3. def resolve(self, context, ignore_failures=False):
    4. if isinstance(self.var, Variable):
    5. try:
    1. obj = self.var.resolve(context) ...
    1. except VariableDoesNotExist:
    2. if ignore_failures:
    3. obj = None
    4. else:
    5. if settings.TEMPLATE_STRING_IF_INVALID:
    6. global invalid_var_format_string
    Variable Value
    context
    [{'pasting': <Pasting: 10239175359>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    ignore_failures
    False
    self
    <django.template.FilterExpression object at 0xb87969cc>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in resolve
    1. raise TemplateSyntaxError("Variables and attributes may not begin with underscores: '%s'" % var)
    2. self.lookups = tuple(var.split(VARIABLE_ATTRIBUTE_SEPARATOR))
    3. def resolve(self, context):
    4. """Resolve this variable against a given context."""
    5. if self.lookups is not None:
    6. # We're dealing with a variable that needs to be resolved
    1. value = self._resolve_lookup(context) ...
    1. else:
    2. # We're dealing with a literal, so it's already been "resolved"
    3. value = self.literal
    4. if self.translate:
    5. return _(value)
    6. return value
    Variable Value
    context
    [{'pasting': <Pasting: 10239175359>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    self
    <Variable: u'pasting.tweet.author.username'>
  • /usr/local/lib/python2.6/dist-packages/django/template/__init__.py in _resolve_lookup
    1. """
    2. current = context
    3. for bit in self.lookups:
    4. try: # dictionary lookup
    5. current = current[bit]
    6. except (TypeError, AttributeError, KeyError):
    7. try: # attribute lookup
    1. current = getattr(current, bit) ...
    1. if callable(current):
    2. if getattr(current, 'alters_data', False):
    3. current = settings.TEMPLATE_STRING_IF_INVALID
    4. else:
    5. try: # method call (assuming no args required)
    6. current = current()
    Variable Value
    bit
    u'author'
    context
    [{'pasting': <Pasting: 10239175359>, 'site': <Site: tweetpaste.thingamaweb.com>}]
    current
    <Tweet: 10239175359>
    e
    DatabaseError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
    self
    <Variable: u'pasting.tweet.author.username'>
  • /usr/local/lib/python2.6/dist-packages/django/db/models/fields/related.py in __get__
    1. # If the related manager indicates that it should be used for
    2. # related fields, respect that.
    3. rel_mgr = self.field.rel.to._default_manager
    4. db = router.db_for_read(self.field.rel.to, instance=instance)
    5. if getattr(rel_mgr, 'use_for_related_fields', False):
    6. rel_obj = rel_mgr.using(db).get(**params)
    7. else:
    1. rel_obj = QuerySet(self.field.rel.to).using(db).get(**params) ...
    1. setattr(instance, cache_name, rel_obj)
    2. return rel_obj
    3. def __set__(self, instance, value):
    4. if instance is None:
    5. raise AttributeError("%s must be accessed via instance" % self._field.name)
    Variable Value
    cache_name
    '_author_cache'
    db
    'default'
    instance
    <Tweet: 10239175359>
    instance_type
    <class 'tweetpaste.tweets.models.Tweet'>
    other_field
    <django.db.models.fields.AutoField object at 0xb869e38c>
    params
    {'id__exact': 1875L}
    rel_mgr
    <django.db.models.manager.Manager object at 0xb869e3ac>
    self
    <django.db.models.fields.related.ReverseSingleRelatedObjectDescriptor object at 0xb869e8ec>
    val
    1875L
  • /usr/local/lib/python2.6/dist-packages/django/db/models/query.py in get
    1. """
    2. Performs the query and returns a single object matching the given
    3. keyword arguments.
    4. """
    5. clone = self.filter(*args, **kwargs)
    6. if self.query.can_filter():
    7. clone = clone.order_by()
    1. num = len(clone) ...
    1. if num == 1:
    2. return clone._result_cache[0]
    3. if not num:
    4. raise self.model.DoesNotExist("%s matching query does not exist."
    5. % self.model._meta.object_name)
    6. raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"
    Variable Value
    args
    ()
    clone
    Error in formatting: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
    kwargs
    {'id__exact': 1875L}
    self
    Error in formatting: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
  • /usr/local/lib/python2.6/dist-packages/django/db/models/query.py in __len__
    1. # Since __len__ is called quite frequently (for example, as part of
    2. # list(qs), we make some effort here to be as efficient as possible
    3. # whilst not messing up any existing iterators against the QuerySet.
    4. if self._result_cache is None:
    5. if self._iter:
    6. self._result_cache = list(self._iter)
    7. else:
    1. self._result_cache = list(self.iterator()) ...
    1. elif self._iter:
    2. self._result_cache.extend(list(self._iter))
    3. return len(self._result_cache)
    4. def __iter__(self):
    5. if self._result_cache is None:
    Variable Value
    self
    Error in formatting: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
  • /usr/local/lib/python2.6/dist-packages/django/db/models/query.py in iterator
    1. if field.name not in load_fields:
    2. skip.add(field.attname)
    3. else:
    4. init_list.append(field.attname)
    5. model_cls = deferred_class_factory(self.model, skip)
    6. compiler = self.query.get_compiler(using=self.db)
    1. for row in compiler.results_iter(): ...
    1. if fill_cache:
    2. obj, _ = get_cached_row(self.model, row,
    3. index_start, using=self.db, max_depth=max_depth,
    4. requested=requested, offset=len(aggregate_select),
    5. only_load=only_load)
    6. else:
    Variable Value
    aggregate_select
    []
    aggregate_start
    8
    compiler
    <django.db.backends.mysql.compiler.SQLCompiler object at 0xb8792b4c>
    extra_select
    []
    fields
    [<django.db.models.fields.AutoField object at 0xb869e38c>, <django.db.models.fields.PositiveIntegerField object at 0xb864eb8c>, <django.db.models.fields.CharField object at 0xb864ec0c>, <django.db.models.fields.CharField object at 0xb864eccc>, <django.db.models.fields.URLField object at 0xb865478c>, <django.db.models.fields.CharField object at 0xb868d60c>, <django.db.models.fields.URLField object at 0xb868d66c>, <django.db.models.fields.DateTimeField object at 0xb868d7cc>]
    fill_cache
    False
    index_start
    0
    load_fields
    []
    max_depth
    5
    only_load
    {}
    pk_idx
    0
    requested
    None
    self
    Error in formatting: (144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
    skip
    None
  • /usr/local/lib/python2.6/dist-packages/django/db/models/sql/compiler.py in results_iter
    1. def results_iter(self):
    2. """
    3. Returns an iterator over the results from executing this query.
    4. """
    5. resolve_columns = hasattr(self, 'resolve_columns')
    6. fields = None
    1. for rows in self.execute_sql(MULTI): ...
    1. for row in rows:
    2. if resolve_columns:
    3. if fields is None:
    4. # We only set this up here because
    5. # related_select_fields isn't populated until
    6. # execute_sql() has been called.
    Variable Value
    fields
    None
    resolve_columns
    True
    self
    <django.db.backends.mysql.compiler.SQLCompiler object at 0xb8792b4c>
  • /usr/local/lib/python2.6/dist-packages/django/db/models/sql/compiler.py in execute_sql
    1. except EmptyResultSet:
    2. if result_type == MULTI:
    3. return empty_iter()
    4. else:
    5. return
    6. cursor = self.connection.cursor()
    1. cursor.execute(sql, params) ...
    1. if not result_type:
    2. return cursor
    3. if result_type == SINGLE:
    4. if self.query.ordering_aliases:
    5. return cursor.fetchone()[:-len(self.query.ordering_aliases)]
    Variable Value
    cursor
    <django.db.backends.util.CursorDebugWrapper object at 0xb879260c>
    params
    (1875,)
    result_type
    'multi'
    self
    <django.db.backends.mysql.compiler.SQLCompiler object at 0xb8792b4c>
    sql
    'SELECT `tweets_twitterer`.`id`, `tweets_twitterer`.`user_id`, `tweets_twitterer`.`username`, `tweets_twitterer`.`display_name`, `tweets_twitterer`.`image_url`, `tweets_twitterer`.`background_colour`, `tweets_twitterer`.`url`, `tweets_twitterer`.`date_updated` FROM `tweets_twitterer` WHERE `tweets_twitterer`.`id` = %s '
  • /usr/local/lib/python2.6/dist-packages/django/db/backends/util.py in execute
    1. def __init__(self, cursor, db):
    2. self.cursor = cursor
    3. self.db = db # Instance of a BaseDatabaseWrapper subclass
    4. def execute(self, sql, params=()):
    5. start = time()
    6. try:
    1. return self.cursor.execute(sql, params) ...
    1. finally:
    2. stop = time()
    3. sql = self.db.ops.last_executed_query(self.cursor, sql, params)
    4. self.db.queries.append({
    5. 'sql': sql,
    6. 'time': "%.3f" % (stop - start),
    Variable Value
    params
    (1875,)
    self
    <django.db.backends.util.CursorDebugWrapper object at 0xb879260c>
    sql
    u'SELECT `tweets_twitterer`.`id`, `tweets_twitterer`.`user_id`, `tweets_twitterer`.`username`, `tweets_twitterer`.`display_name`, `tweets_twitterer`.`image_url`, `tweets_twitterer`.`background_colour`, `tweets_twitterer`.`url`, `tweets_twitterer`.`date_updated` FROM `tweets_twitterer` WHERE `tweets_twitterer`.`id` = 1875 '
    start
    1280583160.1821799
    stop
    1280583160.1826589
  • /usr/local/lib/python2.6/dist-packages/django/db/backends/mysql/base.py in execute
    1. codes_for_integrityerror = (1048,)
    2. def __init__(self, cursor):
    3. self.cursor = cursor
    4. def execute(self, query, args=None):
    5. try:
    1. return self.cursor.execute(query, args) ...
    1. except Database.IntegrityError, e:
    2. raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
    3. except Database.OperationalError, e:
    4. # Map some error codes to IntegrityError, since they seem to be
    5. # misclassified and Django would prefer the more logical place.
    6. if e[0] in self.codes_for_integrityerror:
    Variable Value
    args
    (1875,)
    e
    InternalError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
    query
    'SELECT `tweets_twitterer`.`id`, `tweets_twitterer`.`user_id`, `tweets_twitterer`.`username`, `tweets_twitterer`.`display_name`, `tweets_twitterer`.`image_url`, `tweets_twitterer`.`background_colour`, `tweets_twitterer`.`url`, `tweets_twitterer`.`date_updated` FROM `tweets_twitterer` WHERE `tweets_twitterer`.`id` = %s '
    self
    <django.db.backends.mysql.base.CursorWrapper object at 0xb87929cc>
  • /usr/lib/pymodules/python2.6/MySQLdb/cursors.py in execute
    1. else:
    2. self.messages.append((TypeError, m))
    3. self.errorhandler(self, TypeError, m)
    4. except:
    5. exc, value, tb = exc_info()
    6. del tb
    7. self.messages.append((exc, value))
    1. self.errorhandler(self, exc, value) ...
    1. self._executed = query
    2. if not self._defer_warnings: self._warning_check()
    3. return r
    4. def executemany(self, query, args):
    Variable Value
    ListType
    <type 'list'>
    TupleType
    <type 'tuple'>
    args
    (1875,)
    charset
    'utf8'
    db
    <weakproxy at 0xb887184c to Connection at 0xb874d7bc>
    exc
    <class '_mysql_exceptions.InternalError'>
    exc_info
    <built-in function exc_info>
    query
    'SELECT `tweets_twitterer`.`id`, `tweets_twitterer`.`user_id`, `tweets_twitterer`.`username`, `tweets_twitterer`.`display_name`, `tweets_twitterer`.`image_url`, `tweets_twitterer`.`background_colour`, `tweets_twitterer`.`url`, `tweets_twitterer`.`date_updated` FROM `tweets_twitterer` WHERE `tweets_twitterer`.`id` = 1875 '
    self
    <MySQLdb.cursors.Cursor object at 0xb879212c>
    value
    InternalError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")
  • /usr/lib/pymodules/python2.6/MySQLdb/connections.py in defaulterrorhandler
    1. error = errorclass, errorvalue
    2. if cursor:
    3. cursor.messages.append(error)
    4. else:
    5. connection.messages.append(error)
    6. del cursor
    7. del connection
    1. raise errorclass, errorvalue ...
    1. class Connection(_mysql.connection):
    2. """MySQL Database Connection Object"""
    Variable Value
    error
    (<class '_mysql_exceptions.InternalError'>, InternalError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed"))
    errorclass
    <class '_mysql_exceptions.InternalError'>
    errorvalue
    InternalError(144, "Table './thingamaweb/tweets_twitterer' is marked as crashed and last (automatic?) repair failed")


Request information

GET

Variable Value
iframe_width
u'354'
id
u'10239175359'

POST

No POST data

FILES

No FILES data

No cookie data

META

Variable Value
DOCUMENT_ROOT
'/var/www'
GATEWAY_INTERFACE
'CGI/1.1'
HTTP_HOST
'tweetpaste.thingamaweb.com'
HTTP_USER_AGENT
'Python-urllib/1.17'
PATH
'/usr/local/bin:/usr/bin:/bin'
PATH_INFO
u'/api/gethtml/'
PATH_TRANSLATED
'/web/sites/thingamaweb.com/tweetpaste.wsgi/api/gethtml/'
QUERY_STRING
'iframe_width=354&id=10239175359'
REMOTE_ADDR
'89.16.175.177'
REMOTE_PORT
'59387'
REQUEST_METHOD
'GET'
REQUEST_URI
'/api/gethtml/?iframe_width=354&id=10239175359'
SCRIPT_FILENAME
'/web/sites/thingamaweb.com/tweetpaste.wsgi'
SCRIPT_NAME
u''
SERVER_ADDR
'89.16.175.177'
SERVER_ADMIN
'[no address given]'
SERVER_NAME
'tweetpaste.thingamaweb.com'
SERVER_PORT
'80'
SERVER_PROTOCOL
'HTTP/1.0'
SERVER_SIGNATURE
'<address>Apache/2.2.12 (Ubuntu) Server at tweetpaste.thingamaweb.com Port 80</address> '
SERVER_SOFTWARE
'Apache/2.2.12 (Ubuntu)'
mod_wsgi.application_group
'tweetpaste.thingamaweb.com|'
mod_wsgi.callable_object
'application'
mod_wsgi.listener_host
''
mod_wsgi.listener_port
'80'
mod_wsgi.process_group
'tweetpaste'
mod_wsgi.reload_mechanism
'1'
mod_wsgi.script_reloading
'1'
mod_wsgi.version
(2, 5)
wsgi.errors
<mod_wsgi.Log object at 0xb8895848>
wsgi.file_wrapper
<built-in method file_wrapper of mod_wsgi.Adapter object at 0xb86fc4a0>
wsgi.input
<mod_wsgi.Input object at 0xb86c2908>
wsgi.multiprocess
True
wsgi.multithread
False
wsgi.run_once
False
wsgi.url_scheme
'http'
wsgi.version
(1, 0)

Settings

Using settings module tweetpaste.settings

Setting Value
ABSOLUTE_URL_OVERRIDES
{}
ADMINS
(('Mark Steadman', 'marksteadman@me.com'),)
ADMIN_FOR
()
ADMIN_MEDIA_PREFIX
'/media/'
ALLOWED_INCLUDE_ROOTS
()
APPEND_SLASH
True
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',)
BANNED_IPS
()
BITLY_API_KEY
'R_2ad0cc5f01036b6f4f07e5542aa7a833'
BITLY_USERNAME
'tweetpastebot'
CACHE_BACKEND
'locmem://'
CACHE_MIDDLEWARE_KEY_PREFIX
''
CACHE_MIDDLEWARE_SECONDS
600
COMMENTS_ALLOW_PROFANITIES
False
COMMENTS_BANNED_USERS_GROUP
None
COMMENTS_FIRST_FEW
0
COMMENTS_MODERATORS_GROUP
None
COMMENTS_SKETCHY_USERS_GROUP
None
CSRF_COOKIE_DOMAIN
None
CSRF_COOKIE_NAME
'csrftoken'
CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure'
DATABASES
{'default': {'ENGINE': 'django.db.backends.mysql', 'HOST': '', 'NAME': 'thingamaweb', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'Europe/London', 'USER': 'thingamaweb'}}
DATABASE_ENGINE
'mysql'
DATABASE_HOST
''
DATABASE_NAME
'thingamaweb'
DATABASE_OPTIONS
{}
DATABASE_PASSWORD
'********************'
DATABASE_PORT
''
DATABASE_ROUTERS
[]
DATABASE_USER
'thingamaweb'
DATETIME_FORMAT
'N j, Y, P'
DATETIME_INPUT_FORMATS
('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M', '%m/%d/%y')
DATE_FORMAT
'N j, Y'
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')
DEBUG
True
DEBUG_PROPAGATE_EXCEPTIONS
False
DECIMAL_SEPARATOR
'.'
DEFAULT_CHARSET
'utf-8'
DEFAULT_CONTENT_TYPE
'text/html'
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL
'info@thingamaweb.com'
DEFAULT_INDEX_TABLESPACE
''
DEFAULT_TABLESPACE
''
DISALLOWED_USER_AGENTS
()
EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST
'localhost'
EMAIL_HOST_PASSWORD
'********************'
EMAIL_HOST_USER
''
EMAIL_PORT
25
EMAIL_SUBJECT_PREFIX
'TweetPaste: '
EMAIL_USE_TLS
False
FILE_CHARSET
'utf-8'
FILE_UPLOAD_HANDLERS
('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler')
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
FILE_UPLOAD_PERMISSIONS
None
FILE_UPLOAD_TEMP_DIR
None
FIRST_DAY_OF_WEEK
0
FIXTURE_DIRS
()
FORCE_SCRIPT_NAME
None
FORMAT_MODULE_PATH
None
GOOGLE_ANALYTICS_ACCOUNTS
['UA-9869007-5']
IFRAME_HEIGHT
200
IFRAME_WIDTH
500
IGNORABLE_404_ENDS
('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')
IGNORABLE_404_STARTS
('/cgi-bin/', '/_vti_bin', '/_vti_inf')
INSTALLED_APPS
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'tweetpaste.core', 'tweetpaste.tweets', 'djangles.googleanalytics']
INTERNAL_IPS
()
LANGUAGES
(('ar', 'Arabic'), ('bg', 'Bulgarian'), ('bn', 'Bengali'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('es', 'Spanish'), ('es-ar', 'Argentinean Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('mn', 'Mongolian'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('nb', 'Norwegian Bokmal'), ('nn', 'Norwegian Nynorsk'), ('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'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('uk', 'Ukrainian'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese'))
LANGUAGES_BIDI
('he', 'ar', 'fa')
LANGUAGE_CODE
'en-GB'
LANGUAGE_COOKIE_NAME
'django_language'
LOCALE_PATHS
()
LOGIN_REDIRECT_URL
'/accounts/profile/'
LOGIN_URL
'/accounts/login/'
LOGOUT_URL
'/accounts/logout/'
MANAGERS
(('Mark Steadman', 'marksteadman@me.com'),)
MEDIA_ROOT
'/web/sites/thingamaweb.com/media/'
MEDIA_URL
'http://media.thingamaweb.com/'
MESSAGE_STORAGE
'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'
MIDDLEWARE_CLASSES
('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware')
MONTH_DAY_FORMAT
'F j'
NUMBER_GROUPING
0
PASSWORD_RESET_TIMEOUT_DAYS
'********************'
PREPEND_WWW
False
PROFANITIES_LIST
'********************'
ROOT_URLCONF
'tweetpaste.urls'
SECRET_KEY
'********************'
SEND_BROKEN_LINK_EMAILS
False
SERVER_EMAIL
'info@thingamaweb.com'
SESSION_COOKIE_AGE
1209600
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_NAME
'sessionid'
SESSION_COOKIE_PATH
'/'
SESSION_COOKIE_SECURE
False
SESSION_ENGINE
'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
SESSION_FILE_PATH
None
SESSION_SAVE_EVERY_REQUEST
False
SETTINGS_MODULE
'tweetpaste.settings'
SHORT_DATETIME_FORMAT
'm/d/Y P'
SHORT_DATE_FORMAT
'm/d/Y'
SITE_DESCRIPTION
'Embed tweets into your Website or blog'
SITE_ID
1
SITE_LOGO_URL
'http://media.thingamaweb.com/tweetpaste/img/logo.jpg'
SITE_NAME
'TweetPaste'
TEMPLATE_CONTEXT_PROCESSORS
('django.core.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.request', 'tweetpaste.core.context_processors.settings', 'tweetpaste.tweets.context_processors.tweets')
TEMPLATE_DEBUG
True
TEMPLATE_DIRS
('/web/sites/thingamaweb.com/tweetpaste/templates/', '/web/sites/thingamaweb.com/templates/')
TEMPLATE_LOADERS
('django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source')
TEMPLATE_STRING_IF_INVALID
''
TEST_DATABASE_CHARSET
None
TEST_DATABASE_COLLATION
None
TEST_DATABASE_NAME
None
TEST_RUNNER
'django.test.simple.DjangoTestSuiteRunner'
THOUSAND_SEPARATOR
','
TIME_FORMAT
'P'
TIME_INPUT_FORMATS
('%H:%M:%S', '%H:%M')
TIME_ZONE
'Europe/London'
TRANSACTIONS_MANAGED
False
TWEET_REGEX
'^(http(s)?://)?(www\.)?twitter\.com/(?P<username>(\w*))/status(es)?/(?P<id>(\d*))(/)?$'
TWITTER_BOT_PASSWORD
'********************'
TWITTER_BOT_USERNAME
'tweetpastebot'
TWITTER_PASSWORD
'********************'
TWITTER_USERNAME
'tweetpaste'
URL_VALIDATOR_USER_AGENT
'Django/1.3 pre-alpha (http://www.djangoproject.com)'
USE_ETAGS
False
USE_I18N
True
USE_L10N
False
USE_THOUSAND_SEPARATOR
False
YEAR_MONTH_FORMAT
'F Y'

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.

But when the number of people who follow you outweighs the number you follow by a ratio of 150:1, isn't it then time to look at a few of those tweets and see if you find them interesting?

OK it's hard when you're being flooded by a surge of incoming emails - or you've turned Twitter's follower notifications off because your'e getting swamped - but from time to time I feel bad because I don't follow many of the people who follow me, so imagine that magnified so many times over.

This doesn't come from a place of "I followed X but X never followed me back". Not at all. Stephen Fry followed me when I followed him, but I've had nothing of any use to say to him; he was just doing what he thought was right, but was probably not in his best interests. And that's the key, it's about one's own interest.

I'm not suggesting One Way to use Twitter so that all the little people get to chat to the Big People [shudder], but I do wonder how nice it would be if some of the people who get stuff out of it, could put back into it. For their own benefits, and for the benefit of their network.

I don't know if things have changed in the last year or two, but I remember that the cheif reason people scoffed at Twitter was because they tried it for a week, failed to follow anyone other than the account they'd seen in the news article they themselves were aping, then left. It's failure to stray outside your comfort zone that can lead to an unsatisfactory time on Twitter, and that's why I think it would be valuable if you had a glance once in a while at your list of followers, to see if the people who've made an investment in you are worth making an investment in, in return. If they're not, pass them by. And do it for your own sake, not because I wrote too many words on a Tuesday evening.

* In fact I know that they haven't changed that much in two years, 'cos Ricky Gervais was party to the same misconception

One comment

  1. urbanfly

    I would like to follow more of the people who follow me, and I have done so in the past, but I really struggle to keep track of conversations & people so need to pull back on the number I'm following.

    urbanfly

Leave your comments