How to investigate internal error 500 when deploying locally?

11 views
Skip to first unread message

blep

unread,
Sep 29, 2009, 12:59:53 PM9/29/09
to codereview-discuss
Hi,
I'm trying to deploy rietveld locally using gae2django on Windows/
Python 2.6.

Following the instruction, I was able to install everything. The web
interface seems to run fine, but I'm getting an error 500 on the
server when I use upload.py without any detail to be able to
investigate:

--- Server output ---
Django version 1.1, using settings 'rietveld.settings'
Development server is running at http://localhost:10666/
Quit the server with CTRL-BREAK.
C:\dev\third-parties\codereview\gae2django\examples\rietveld\codereview
\feeds.py:16: DeprecationWarning: the md5 mo
dule is deprecated; use hashlib instead
import md5
[29/Sep/2009 17:21:56] "POST /upload HTTP/1.1" 500 151246
---

How can I investigate this (I'm new to django). In file gae2django
\examples\rietveld\settings.py I have DEBUG to True and I've added a
correct user/e-mail in ADMINS, but I don't receive any mails with the
error detail. By the way, how does django send the mail? I'm in a
corporate setting, and it can not use the smtp server directly. Does
it use Windows specific API do to that?

Anyway, I just would like to know how to get the exception trace on
the server side...

Baptiste.

Evan Martin

unread,
Sep 30, 2009, 1:32:09 AM9/30/09
to coderevie...@googlegroups.com
I think GAE only supports Python 2.5. I think I recall seeing that
error when you use the wrong version of Python.

blep

unread,
Sep 30, 2009, 2:41:07 AM9/30/09
to codereview-discuss


On 30 sep, 07:32, Evan Martin <mart...@danga.com> wrote:
> I think GAE only supports Python 2.5.  I think I recall seeing that
> error when you use the wrong version of Python.
>
I'll give it a shoot. I though that this limitation did not apply when
you are using gae2django (e.g. the application is not running with app
engine SDK)?

Still, do you have any idea how to get detail about the failure? I'm
suspecting that this may be just a configuration issue that triggers
only in the upload handler since the web UI seems to work fine.

Baptiste Lepilleur

unread,
Sep 30, 2009, 3:54:52 AM9/30/09
to coderevie...@googlegroups.com
I finally figured out how to configure the e-mail stuff (SMTP server configuration is in gae2django\examples\rietveld\django\conf\global_settings.py).

Below is the error I'm getting using the following upload command-line:

c:\python25\python e:\prg\thirdparties\codereview\gae2django\examples\rietveld\st
atic\upload.py -s 127.0.0.1:10666 -m"test" -y -h

I indeed do not specify any user. How does upload.py figure out what the user is?

---
Traceback (most recent call last):

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\django\core\handlers\base.py", line 87, in get_response
    response = middleware_method(request, callback, callback_args, callback_kwargs)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\rietveld_helper\middleware.py", line 21, in process_view
    response = view_func(request, *view_args, **view_kwargs)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\codereview\views.py", line 478, in post_wrapper
    return func(request, *args, **kwds)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\codereview\views.py", line 831, in upload
    issue = _make_new(request, form)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\codereview\views.py", line 1041, in _make_new
    issue = db.run_in_transaction(txn)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\django\db\transaction.py", line 240, in _commit_on_success
    res = func(*args, **kw)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\gae2django\gaeapi\appengine\ext\db.py", line 805, in run_in_transaction
    return func(*args, **kwds)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\codereview\views.py", line 1027, in txn
    issue.put()

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\gae2django\gaeapi\appengine\ext\db.py", line 217, in put
    return self.save()

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\gae2django\gaeapi\appengine\ext\db.py", line 229, in save
    super(Model, self).save()

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\django\db\models\base.py", line 410, in save
    self.save_base(force_insert=force_insert, force_update=force_update)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\django\db\models\base.py", line 495, in save_base
    result = manager._insert(values, return_id=update_pk)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\django\db\models\manager.py", line 177, in _insert
    return insert_query(self.model, values, **kwargs)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\django\db\models\query.py", line 1087, in insert_query
    return query.execute_sql(return_id)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\django\db\models\sql\subqueries.py", line 320, in execute_sql
    cursor = super(InsertQuery, self).execute_sql(None)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\django\db\models\sql\query.py", line 2369, in execute_sql
    cursor.execute(sql, params)

  File "E:\prg\thirdparties\codereview\gae2django\examples\rietveld\django\db\backends\sqlite3\base.py", line 193, in execute
    return Database.Cursor.execute(self, query, params)

IntegrityError: codereview_issue.owner_id may not be NULL
---

Andi Albrecht

unread,
Sep 30, 2009, 4:52:27 AM9/30/09
to coderevie...@googlegroups.com, gae2d...@googlegroups.com
This is a problem with gae2django, not Rietveld itself. To avoid
further misunderstandings on this list, I've created a discussion
group for gae2django: http://groups.google.com/group/gae2django?hl=en
(this message is cross-posted to the new list too). I think it would
be useful to continue this discussion there.

However, thanks for reporting this! This is a bug that was introduced
in one of the last version. It's not fixed in gae2django (r117).

Regards,

Andi

Baptiste Lepilleur

unread,
Sep 30, 2009, 11:34:45 AM9/30/09
to coderevie...@googlegroups.com
2009/9/30 Andi Albrecht <albrec...@googlemail.com>

[...]

However, thanks for reporting this! This is a bug that was introduced
in one of the last version. It's not fixed in gae2django (r117).

Figured it out. I think you mean: it's fixed in r117... (I no longer get the error after updating to trunk) 

Reply all
Reply to author
Forward
0 new messages