3 ms·
Reddit infrastructure revealed
(Pylons, Paste, Beaker, flup and more)
- ghiotion 19y agoOk, I'll be the first person to admit I'm an idiot, but this stack trace doesn't make any sense. First, how am I to know this is actually from reddit.com? It's an image, so I can't grep through the trace. Additionally, it looks to me like the initial error refers to accout.py at line 68... maybe I'm blind, but I don't see that anywhere in the trace. I'm no python expert but I've looked at a lot of java stack traces and this makes no sense. Seriously. Why deliver this as an image? What sequence of events did you go through to get this result? Is it repeatable? If so, how? I know reddit bashing is super-fashionable right now, but really. Am I being dumb? It's well within the realm of possibilities. But this doesn't pass the sniff test.
- breily 19y agoAs for its authenticity, it was on reddit/programming a few days ago - http://reddit.com/r/programming/info/69ftg/comments/ http://reddit.com/r/programming/info/69ftg/comments/ - and apparently one of the reddit guys caused it.
- ghiotion 19y agoOk, I stand corrected. If spez did it, it's legit. Kudos.
- aston 19y agoaccount.py was included at the very bottom of the stack trace. The trace didn't include the offending line, though, which is kinda confusing.
- ketralnis 19y agoOf course, that's mostly pylons code. The only information I glean from here is: 1. FreeBSD 6.2 2. Pylons 3. /home/ri/hgreddit
- aston 19y agoMissed one: hgreddit => Mercurial.
- bootload 19y ago"... missed one: hgreddit => Mecurial ..." And Paste. The most interesting thing I saw was the bug that caused it found right at the bottom: "... unindent does not match any outer indentation level (account.py, line 68) ..." This is such a pain with Python (having to line the indentation up) and is so trivial. Wonder how it got through testing? They do testing on reddit don't they?
- a-priori 19y agoIf you find indentation to be a pain in Python, you haven't configured your editor properly.
- bootload 19y ago"... If you find indentation to be a pain in Python, you haven't configured your editor properly. ..." While it's easy to config your own editor [0]. There are other factors * uncommonly used editors [1] * other users/developers Of the two, other developers is the biggest pain. You have to make sure each developers editor conforms to your coding standards. [1] But making "quick changes" on the server, can short-cut such safeguards. [0] http://wiki.python.org/moin/HowToEditPythonCode http://wiki.python.org/moin/HowToEditPythonCode [1] http://wiki.python.org/moin/PythonEditors http://wiki.python.org/moin/PythonEditors
- anewaccountname 19y agoWow, I can't believe python doesn't have something similar to ruby's ruby -c foo.rb
- inklesspen 19y agoThird party tools like the excellent pylint exist. And of course, your unit tests should verify that your code is free of syntax errors too, right? Only problem is, the guy edited the code directly on the live server without testing.
- agotterer 19y agoWhat are they using for such pretty error messages in py?
- inklesspen 19y agoThat's actually a pretty ugly error by Pylons' standards. Normally a _very_ useful debugging console gets presented to the devs, and the public gets a standard (but customizable/replaceable) error screen. What happened here is that the exception happened again while trying to process the error (syntax errors in your base-level code will do that), and the Pylons exception handling gave up and rendered this error. I don't know offhand exactly what produced that error message, as I've never seen it in my Pylons apps, but I'd suggest it's probably from paste.exceptions somewhere. http://pythonpaste.org/module-paste.exceptions.html http://pythonpaste.org/module-paste.exceptions.html EDIT: I realized that the reason I never see this is because Reddit uses flup's SCGI server, while I use a mod_proxy-based approach. So that exception-formatting code is probably in flup somewhere. http://trac.saddi.com/flup http://trac.saddi.com/flup
- ivankirigin 19y agoI thought this was going to be a joke about imageshack, how [pics] power reddit.