It happened to me today.
I noticed that on the first time I loaded the website, it loaded fine, and 
on the second time it crashed with the same exception.
I've looked at the "twitter_query" table and there were two rows with 
identical values:
id, type, value, interested
1, search, from:stephen_mcd mezzanine 0
2, search, from:stephen_mcd mezzanine 0

I've guessed it was some kind of bug causing the "get_or_create" to create 
the row twice because it didn't find it on the first time.
and I've also guessed it might be related to the table's character set.
Well, it was set to latin

mysql> show create table twitter_query;
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table         | Create Table                                             
                                                                            
                                                                            
                                       |
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| twitter_query | CREATE TABLE `twitter_query` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(10) NOT NULL,
  `value` varchar(140) NOT NULL,
  `interested` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 |

And after recreating the database with utf8 it solved the problem.

On Saturday, May 25, 2013 1:39:45 AM UTC+3, Stephen McDonald wrote:
>
> Thanks Steve.
>
> I can't reproduce this - I think there's something else going on here.
>
> On Sat, May 25, 2013 at 8:09 AM, Steve Jain <steve...@gmail.com<javascript:>
> > wrote:
>
>> I am generally not very experienced with web development, and certainly 
>> not so with Mezzanine, but I think it's worth sharing the experience I had 
>> with Mezzanine this morning.
>>
>> I set up my virtualenv, installed Django, South, then Mezzanine, as 
>> usual. After creating the database and firing up the server, I opened up 
>> the site in my browser, expecting the usual Congratulations! page, but 
>> instead got a 'MultipleObjectsReturned: get() returned more than one 
>> Query' error.
>>
>> After messing around, it turns out the default 'python mezzanine' search 
>> terms need to be in quotes *in the search box*. I'm not sure if this was 
>> required before, but I certainly didn't get this error in the past.
>>
>> I'm pretty sure my environment is identical to the one I used in the 
>> past, except for Mezzanine (1.4.6 to 1.4.7) and South (0.7.6 to 0.8.1). For 
>> what it's worth, my Python version has remained constant.
>>
>> Anyway, I'm not really asking a question here, just raising awareness for 
>> a slight potential quirk in the way search queries are handled in Mezzanine 
>> 1.4.7.
>>
>> Since it seems to occur after a fresh install of the framework, it may 
>> throw off a lot of people who don't know its internals very well.
>>  
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mezzanine-use...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Stephen McDonald
> http://jupo.org 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to