2009年1月5日 星期一

從 Plurk 錯誤訊息看寫作風格

剛不小心去按 plurk, 發現跑出一段 error code:
Traceback (most recent call last):
File "/home/plurk/plurk/production/releases/20090104210908/ext/parts/web/wsgiserver/__init__.py", line 987, in communicate
req.respond()
File "/home/plurk/plurk/production/releases/20090104210908/ext/parts/web/wsgiserver/__init__.py", line 543, in respond
self._respond()
File "/home/plurk/plurk/production/releases/20090104210908/ext/parts/web/wsgiserver/__init__.py", line 555, in _respond
response = self.wsgi_app(self.environ, self.start_response)
File "/home/plurk/plurk/production/releases/20090104210908/ext/werkzeug/utils.py", line 896, in __call__
return app(environ, start_response)
File "/home/plurk/plurk/production/releases/20090104210908/ext/werkzeug/utils.py", line 839, in __call__
return self.app(environ, start_response)
File "/home/plurk/plurk/production/releases/20090104210908/ext/parts/web/web.py", line 232, in dispatch_request
rv = handle_error()
File "/home/plurk/plurk/production/releases/20090104210908/ext/parts/web/web.py", line 288, in handle_error
result = handler(e)
File "plurk/server.py", line 139, in _error_handler
trace_back=t_b)
File "plurk/templates.py", line 68, in renderPlurkTemplate
html = PlurkTemplates().addDynamicData(html, ses_user, page_user)
File "plurk/templates.py", line 73, in addDynamicData
'session_user': users.exposeSessionUser(ses_user),
File "plurk/users.py", line 100, in exposeSessionUser
session_user['notifications_count'] = model.Notifications().getCount(user)
File "plurk/model.py", line 1632, in getCount
cnt = db.selectCount('notifications', to_uid = user.id, where='status in (0, -2)')
File "/home/plurk/plurk/production/releases/20090104210908/ext/parts/db/wrapper.py", line 154, in selectCount
res = self.select(table, cols="COUNT(%s)" % column, as_one=True, **kw)
File "/home/plurk/plurk/production/releases/20090104210908/ext/parts/db/wrapper.py", line 98, in select
with self.cursor(sql) as cursor:
File "/home/plurk/plurk/production/releases/20090104210908/ext/parts/db/wrapper.py", line 50, in cursor
con = self.connections.createConnection(host)
File "/home/plurk/plurk/production/releases/20090104210908/ext/parts/db/wrapper.py", line 429, in createConnection
raise Exception('Could not create a connection. Error was %s' % exception)
Exception: Could not create a connection. Error was Traceback (most recent call last):
File "/home/plurk/plurk/production/releases/20090104210908/ext/parts/db/wrapper.py", line 414, in createConnection
charset = dbinfo.charset)
File "/var/lib/python-support/python2.5/MySQLdb/__init__.py", line 74, in Connect
return Connection(*args, **kwargs)
File "/var/lib/python-support/python2.5/MySQLdb/connections.py", line 170, in __init__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (2003, "Can't connect to MySQL server on '192.168.0.250' (99)")

從這邊可以看到 plurk 的一些寫作風格, ...

1. Python, 廢話
2. MySQL, 這也猜得出來
3. Object Oriented, 這已經是主流了
4. werkzeug Library, 做為前台 UI Framework?
5. wsgiServer API, 這我也沒用過..

最近, plurk 的邀請網址也改成人讀了, 如 http://plurk.com/genehong/invite , 大家可以去玩玩看...

沒有留言:

張貼留言

LinkWithin

Related Posts Plugin for WordPress, Blogger...

熱門文章