Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

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

Open
shacker opened this issue Mar 2, 2010 · 1 comment
Open

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

shacker opened this issue Mar 2, 2010 · 1 comment

Comments

@shacker
Copy link

shacker commented Mar 2, 2010

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
Copy link
Author

shacker commented Mar 4, 2010

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant