"tuple' object has no attribute 'get'"

372 views
Skip to first unread message

Tyson Tate

unread,
Jun 16, 2006, 5:02:56 PM6/16/06
to django...@googlegroups.com
Starting with the latest SVN, a fresh DB, and the following Model:

http://django.pastebin.com/713796

I get a "tuple' object has no attribute 'get'" error whenever I try
to add a new Post.

Stack trace here: http://django.pastebin.com/713819

Any ideas?

Thanks,
Tyson

Don Arbow

unread,
Jun 16, 2006, 5:46:28 PM6/16/06
to django...@googlegroups.com


Just a hunch. You have a comma at the end of the fields tuple in your
Admin inner class (line 36 according to the pastebin). Maybe that's it?

Don


Tyson Tate

unread,
Jun 16, 2006, 5:56:44 PM6/16/06
to django...@googlegroups.com

On Jun 16, 2006, at 2:46 PM, Don Arbow wrote:
>
> Just a hunch. You have a comma at the end of the fields tuple in your
> Admin inner class (line 36 according to the pastebin). Maybe that's
> it?
>
> Don

I deleted the comma, but I still get the same error.

-Tyson

Frankie Robertson

unread,
Jun 18, 2006, 8:11:30 AM6/18/06
to django...@googlegroups.com
On 16/06/06, Don Arbow <don...@nwlink.com> wrote:
>
> On Jun 16, 2006, at 2:02 PM, Tyson Tate wrote:
>
> >
> > Starting with the latest SVN, a fresh DB, and the following Model:
> >
> > http://django.pastebin.com/713796
> >
> > I get a "tuple' object has no attribute 'get'" error whenever I try
> > to add a new Post.
> >
> > Stack trace here: http://django.pastebin.com/713819
> >
> > Any ideas?
> >

http://django.pastebin.com/713796 seems to have expired, why not just
paste the code here? This ain't IRC.

>
>
> Just a hunch. You have a comma at the end of the fields tuple in your
> Admin inner class (line 36 according to the pastebin). Maybe that's it?

One of the nice things about python is that trailing commas are
completely legal.

>
> Don
>
>
>
> >
>

Don Arbow

unread,
Jun 18, 2006, 12:03:34 PM6/18/06
to django...@googlegroups.com

On Jun 18, 2006, at 5:11 AM, Frankie Robertson wrote:

>
> One of the nice things about python is that trailing commas are
> completely legal.


Yes, but this was not a trailing comma within the tuple, but at the
end of the statement. Legal or not, I have never seen this (except,
in the print statement, which suppresses the newline). I mentioned it
only because I thought it may have changed the semantics of the code,
not that it was a syntax error.

Don

Reply all
Reply to author
Forward
0 new messages