sajingeo / rietveld

Automatically exported from code.google.com/p/rietveld
Apache License 2.0
0 stars 0 forks source link

500 server error triggered by anonymous user #136

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
First, I should say I cannot reproduce this on codereview.appspot.com.

What steps will reproduce the problem?
1. open http://rietest.appspot.com
2. sign out if already signed in.
3. open http://rietest.appspot.com/user/gae.test01

What is the expected output? What do you see instead?
Expected to see the list of issues for user gae.test01.
Got 500 server error instead.

What version of the product are you using? On what operating system?
rietveld r427
Windows Vista

Please provide any additional information below.

The app rietest.appspot.com is newly created. all changes are uploaded as:
http://rietest.appspot.com/1004

Below is log from GAE
#

[xxx.My.IP.xxx] - - [27/Jul/2009:09:20:25 -0700] "GET /user/gae.test01
HTTP/1.1" 500 142 "http://rietest.appspot.com/" "Mozilla/5.0 (Windows; U;
Windows NT 6.0; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
GTB5,gzip(gfe)" "rietest.appspot.com"

#
I 07-27 09:20AM 23.578

Loading __main__, app version = 3.335198202932664188

#
I 07-27 09:20AM 23.584

django.__file__ =
'/base/python_lib/versions/third_party/django-1.0/django/__init__.py',
django.VERSION = (1, 0, 2, 'final', 0)

#
I 07-27 09:20AM 25.412

request.user None

#
E 07-27 09:20AM 25.484

Exception in request: AttributeError: 'NoneType' object has no attribute
'email'
Traceback (most recent call last):
  File
"/base/python_lib/versions/third_party/django-1.0/django/core/handlers/base.py",
line 86, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File
"/base/data/home/apps/rietest/3.335198202932664188/codereview/views.py",
line 540, in user_key_wrapper
    return func(request, *args, **kwds)
  File
"/base/data/home/apps/rietest/3.335198202932664188/codereview/views.py",
line 722, in show_user
    return _show_user(request)
  File
"/base/data/home/apps/rietest/3.335198202932664188/codereview/views.py",
line 736, in _show_user
    if issue.owner != user and _can_view_issue(request.user, issue)]
  File
"/base/data/home/apps/rietest/3.335198202932664188/codereview/views.py",
line 458, in _can_view_issue
    user_email = db.Email(user.email())
AttributeError: 'NoneType' object has no attribute 'email'

Original issue reported on code.google.com by lihaitao on 27 Jul 2009 at 4:38

GoogleCodeExporter commented 9 years ago
Looks like you found a bug in r427 (which we haven't pushed out yet, luckily).

Let me know if this fix works: http://codereview.appspot.com/96168

Original comment by gvanrossum@gmail.com on 27 Jul 2009 at 4:49

GoogleCodeExporter commented 9 years ago
Fixed in r428.

Original comment by gvanrossum@gmail.com on 27 Jul 2009 at 5:03