Skip to content

Instantly share code, notes, and snippets.

Traceback (most recent call last):
File "/bundles/app-15272-x8eFpo/epio_wsgi.py", line 30, in __call__
output = wsgi_entrypoint(environ, self.start_response)
File "/mnt/bundles/app-15272-x8eFpo/pyenv/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 250, in __call__
self.load_middleware()
File "/mnt/bundles/app-15272-x8eFpo/pyenv/lib/python2.6/site-packages/django/core/handlers/base.py", line 47, in load_middleware
raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
ImproperlyConfigured: Error importing middleware dbindexer.middleware: "No module named autoload"
2011-05-05 20:11:42 [8494] [ERROR] Error handling request
@ciferkey
ciferkey / gist:1041101
Created June 22, 2011 20:35
Traceback thrown by mongodb backend for scrapy (https://github.com/noplay/scrapy-mongodb)
Traceback (most recent call last):
File "/Users/ciferkey/.virtualenvs/scraper/lib/python2.7/site-packages/scrapy/middleware.py", line 54, in _process_chain
return process_chain(self.methods[methodname], obj, *args)
File "/Users/ciferkey/.virtualenvs/scraper/lib/python2.7/site-packages/scrapy/utils/defer.py", line 65, in process_chain
d.callback(input)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/defer.py", line 361, in callback
self._startRunCallbacks(result)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/defer.py", line 455, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
@ciferkey
ciferkey / gist:1044924
Created June 24, 2011 14:48
Tracebook thrown in scrapy unittest
Traceback (most recent call last):
File "/Users/ciferkey/Projects/scraper/scraper/spiders/scraper_spider.py", line 26, in test_parse_bank_page
print ScraperSpider.parse_bank_page(self.s, r)
File "/Users/ciferkey/Projects/scraper/scraper/spiders/scraper_spider.py", line 127, in parse_bank_page
institution_id = hxs.select(x_id).extract()[0]
File "/Users/ciferkey/.virtualenvs/scraper/lib/python2.7/site-packages/scrapy/selector/lxmlsel.py", line 51, in select
result = self.xpathev(xpath)
File "/Users/ciferkey/.virtualenvs/scraper/lib/python2.7/site-packages/scrapy/selector/lxmlsel.py", line 46, in xpathev
self._xpathev = etree.XPathEvaluator(self.root, namespaces=self.namespaces)
File "/Users/ciferkey/.virtualenvs/scraper/lib/python2.7/site-packages/scrapy/selector/lxmlsel.py", line 40, in root
@ciferkey
ciferkey / gist:1051117
Created June 28, 2011 13:21
Scrapy traceback
Traceback (most recent call last):
File "tests.py", line 9, in <module>
from scraper import utils
ImportError: cannot import name utils

"Ok, I came up with an example.

Programming is like doing a massive sudoku. But you’re not just doing your own square; you have to line up the edges with squares that you’ve already done, or squares other people in your team are working on.

And it’s not just squares that you’ve done — you have to anticipate the sudokus you’ll be doing days, weeks or months from now, and leave easy numbers at the edges so it isn’t impossible to do those squares.

And that’s why some programmers are so engrossed in it, and get all worked up, because they’re like “You left a 5 in the middle of the square, what kind of asshole does that, now I’m gonna have to line all my squares up with that.”

And then someone points out a bug, and you have to trace it back to the square it came from, and then redo that square without screwing up all the other ones.

@ciferkey
ciferkey / itunes_festival.py
Created August 4, 2011 15:05 — forked from jrave/itunes_festival.py
Quick and Dirty script to automate some stuff for the itunes festival streams
import urllib2
import re
url = ''
host='http://streaming.itunesfestival.com'
def get_token():
sub = url.find('?token=')
return url[sub:]
@ciferkey
ciferkey / about.md
Created August 9, 2011 16:33 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
import urllib2
import re
xml = urllib2.urlopen("http://steamcommunity.com/id/ciferkey/?xml=1").read()
re.search("<steamID64>(\d+)</steamID64>", xml).group(1)
@ciferkey
ciferkey / gist:1230363
Created September 20, 2011 21:10
Reddit Setup Script on Debian

This modifies this guide to work on any Debian system.

install: pycaptcha apt-get: libxml2-dev python-dev

pip: uwsgi

@ciferkey
ciferkey / gist:1239669
Created September 24, 2011 18:24
epio console log
#### New version (v3) uploaded at 2011-09-23 23:53:13.848290 ####
2011-09-24 00:53:28 [847] [INFO] Starting gunicorn 0.12.2
2011-09-24 00:53:28 [847] [INFO] Listening at: unix:/bundles/port-8964/tmp/gunicorn.sock (847)
2011-09-24 00:53:28 [847] [INFO] Using worker: eventlet
2011-09-24 00:53:28 [851] [INFO] Booting worker with pid: 851
2011-09-24 00:53:28 [852] [INFO] Booting worker with pid: 852
2011-09-23 20:09:43 [852] [ERROR] Error handling request
Traceback (most recent call last):
File "/bundles/port-8964/app_image/pyenv/lib/python2.7/site-packages/gunicorn/workers/async.py", line 67, in handle_request