django-twango icon indicating copy to clipboard operation
django-twango copied to clipboard

object.__new__(ellipsis) is not safe, use ellipsis.__new__()

Open shacker opened this issue 14 years ago • 1 comments

If I enable Twango MiddleWare, then invoke a view that contains request.user.get_profile(), I get this hairy traceback:

http://dpaste.com/166692/

If comment out either the Twango middleware OR the view line calling get_profile(), the crash goes away, so it seems to be some interaction between them.

shacker avatar Mar 02 '10 07:03 shacker

More info: This is interesting. I commented out the code below and replaced it with the following lines, and the crash went away.

# Is this from the current user's list?
# if request.user.is_authenticated():
#     mylist = get_object_or_404(List,profile=request.user.get_profile())
#     # mylist = None
# else:
#     mylist = None
try:
    mylist = get_object_or_404(List,profile=request.user.get_profile())
except:
    mylist = None

shacker avatar Mar 04 '10 08:03 shacker