Re: Having problems getting started with Zyons
Quick update, Ian has updated the source in svn to fix the glitch. I've svn-uped and it everything is hunky-dory... Thanks very much Ian, from a reported glitch at 10:16 through to resolution by 12:31. Nice one! Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Having problems getting started with Zyons
I've posted a ticket at http://zyons.python-hosting.com/ticket/3 with a description of the problem and a possible solution based on the SQL alias. Funny, I would have thought there were more MySQL 4.0-4.1 people around than that (which would have shown the glitch earlier), guess I really do need to look at MySQL 5!! Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Having problems getting started with Zyons
Thanks Ian, Malcolm, this works!; mysql> select content_type_id, object_id, sum( unique_views) as sum_uv from counter_objecthourcounter where site_id=1 and effective_date >= '2006-07-18 09:50:07' and content_type_id in (30) group by content_type_id, object_id order by sum_uv desc LIMIT 40; Empty set (0.00 sec) IMHO, The initial error message from MySQL (Invalid use of group function) is a little bit misleading...as look what happens if the 'group by' part of the query is removed; mysql> select content_type_id, object_id, sum( unique_views) as sum_uv from counter_objecthourcounter where site_id=1 and effective_date >= '2006-07-18 09:50:07' and content_type_id in (30) order by sum(unique_views) LIMIT 40; ERROR (HY000): Invalid use of group function Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Having problems getting started with Zyons
On Wed, 2006-07-19 at 10:40 +, tonemcd wrote: > I dug around a little, href="http://archives.neohapsis.com/archives/mysql/2005-q2/1966.html;>this > helped a lot - and I found that this works (4.1.18-standard); > > mysql> select content_type_id, object_id, sum( unique_views) from > counter_objecthourcounter where site_id=1 and effective_date >= > '2006-07-18 09:50:07' and content_type_id in (30) group by > content_type_id, object_id LIMIT 40; > Empty set (0.00 sec) > > > But of course the 'order by sum (unique_views) desc' has gone. Does it work if you give the sum() an alias? So put "sum( unique_views) as s" in the select clause and "order by s desc" later on? Yes, it's a short in the dark, but it's not clear to me if that version fo MySQL doesn't like order by aggregates at all or if it's something more subtle. So there's one more possibility for you to try. Regards, Malcolm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Having problems getting started with Zyons
try order by 3 descOn 19/07/2006, at 8:40 PM, tonemcd wrote:I dug around a little,http://archives.neohapsis.com/archives/mysql/2005-q2/1966.html">thishelped a lot - and I found that this works (4.1.18-standard);mysql> select content_type_id, object_id, sum( unique_views) fromcounter_objecthourcounter where site_id=1 and effective_date >='2006-07-18 09:50:07' and content_type_id in (30) group bycontent_type_id, object_id LIMIT 40;Empty set (0.00 sec)But of course the 'order by sum (unique_views) desc' has gone.Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Having problems getting started with Zyons
I dug around a little, http://archives.neohapsis.com/archives/mysql/2005-q2/1966.html;>this helped a lot - and I found that this works (4.1.18-standard); mysql> select content_type_id, object_id, sum( unique_views) from counter_objecthourcounter where site_id=1 and effective_date >= '2006-07-18 09:50:07' and content_type_id in (30) group by content_type_id, object_id LIMIT 40; Empty set (0.00 sec) But of course the 'order by sum (unique_views) desc' has gone. Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Having problems getting started with Zyons
hmm..the SQL shouldn't be that complex.. it's pretty standardcan you try running it without the date ?or perhaps changethe with content_type_id in (30) to content_type_id = 30On 19/07/2006, at 8:10 PM, tonemcd wrote:Ian,I think that's it - it definitely causes an SQL error on MySQL4.1.18-standard.Drat. Our main systems (where I intend to run django 'for real') arestuck on the 4.1 series for the time being (hence why my machine isstill running 4.1.18-standard). However, as I make the final decisionson what server versions we use, this could change ... ;)Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Having problems getting started with Zyons
Ian, I think that's it - it definitely causes an SQL error on MySQL 4.1.18-standard. Drat. Our main systems (where I intend to run django 'for real') are stuck on the 4.1 series for the time being (hence why my machine is still running 4.1.18-standard). However, as I make the final decisions on what server versions we use, this could change ... ;) Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Having problems getting started with Zyons
didn't 'diss' it at all.bugs happen.have you tried running the SQL directly from the mysql command prompt?it doesn't cause an error on mysql 5.0.16 or 5.1.11;(maybe the trackback will help.On 19/07/2006, at 7:56 PM, tonemcd wrote:Sorry Ian, I didn't mean to diss your application in the maindiscusssion forum! I just thought it might be a stupid user problem (Icouldn't find it in the zyons.com forum).I've been watching the development of zyons for a while with a view tousing it for the first stage of our Zope migration project and thoughtthat I'd have a go at the latest release.Stupidly, I have posted the wrong SQL, it should be;select content_type_id, object_id, sum( unique_views) fromcounter_objecthourcounter where site_id=1 and effective_date >='2006-07-18 09:50:07' and content_type_id in (30) group bycontent_type_id, object_id order by sum( unique_views ) desc LIMIT 40I'll post the trackback in the 'bugs' forum at zyons.comThanks for what looks like a really useful application by the way!Cheers,Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Having problems getting started with Zyons
Sorry Ian, I didn't mean to diss your application in the main discusssion forum! I just thought it might be a stupid user problem (I couldn't find it in the zyons.com forum). I've been watching the development of zyons for a while with a view to using it for the first stage of our Zope migration project and thought that I'd have a go at the latest release. Stupidly, I have posted the wrong SQL, it should be; select content_type_id, object_id, sum( unique_views) from counter_objecthourcounter where site_id=1 and effective_date >= '2006-07-18 09:50:07' and content_type_id in (30) group by content_type_id, object_id order by sum( unique_views ) desc LIMIT 40 I'll post the trackback in the 'bugs' forum at zyons.com Thanks for what looks like a really useful application by the way! Cheers, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Having problems getting started with Zyons
Hi Tony.Thanks for giving Zyons a whirl.'popular_objects' is part of the 'counter' app which tracks what people are viewing.you don't need it installed for the rest of the app to run.that being said.he SQL you are showing me doesn't seem to contain the 'group by' command which looks like it is present in all the vairous forms in zilbo/common/counter/models.py ;(can you post the trackback on zyons in the 'bugs' forum.. http://zyons.com/forum/bugs/as I'm not sure django-users is appropriate for discussion custom apps.On 19/07/2006, at 7:16 PM, tonemcd wrote:Hi all,I'm trying to get the Zyons community/bulletin board system up andrunning - we think it could be extremely useful for a large part of oureducation community, and will assist us in migrating from Zope toDjango. Trouble is, I can't get it to work on my machine (MacBook Pro,Python 2.4.3/MySL 4.1.18-standard)I get this error on pointing at the root;ProgrammingError at /(, 'Invalid use of group function')Template error (at line 38)In template/Users/bingobob/Sites/zilbo/common/forum/templates/forum/main_page.html,error at line 38Caught an exception while rendering.28 {% latest_conversations conv 10 %}29 30 {% for c in conv %}31 {{ c.forum.name}} {{ c.name }}32 {% endfor %}33 34 3536 37 Most Popular38 {% popular_objects Conversation c_o 40 %}39 40 {% for a in c_o %}41 {{ a.0.name }}42 {% endfor %}43 44 45 46 4748 {% endblock %}The actual SQL generated is;select content_type_id, object_id, sum( unique_views) fromcounter_objecthourcounter where site_id=1 and effective_date >='2006-07-18 09:12:08' and content_type_id in (30) order by sum(unique_views ) desc LIMIT 40Is this a simple thing that I can fix (ie I've done something stupid),or do I need to include more traceback information?Cheers for any help,Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Having problems getting started with Zyons
On Wed, 2006-07-19 at 09:16 +, tonemcd wrote: > Hi all, > I'm trying to get the Zyons community/bulletin board system up and > running - we think it could be extremely useful for a large part of our > education community, and will assist us in migrating from Zope to > Django. Trouble is, I can't get it to work on my machine (MacBook Pro, > Python 2.4.3/MySL 4.1.18-standard) > > I get this error on pointing at the root; > > ProgrammingError at / > (, 'Invalid use of group function') [...] > The actual SQL generated is; > select content_type_id, object_id, sum( unique_views) from > counter_objecthourcounter where site_id=1 and effective_date >= > '2006-07-18 09:12:08' and content_type_id in (30) order by sum( > unique_views ) desc LIMIT 40 I'm not familiar with Zyons, so I don't know if this is a query you are generating or one from inside the product, but the SQL is bad. here should be a "group by content_type_id, object_id" clause in that SQL statement. You have to group by all the non-aggregate return values in a query like that. Regards, Malcolm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Having problems getting started with Zyons
Hi all, I'm trying to get the Zyons community/bulletin board system up and running - we think it could be extremely useful for a large part of our education community, and will assist us in migrating from Zope to Django. Trouble is, I can't get it to work on my machine (MacBook Pro, Python 2.4.3/MySL 4.1.18-standard) I get this error on pointing at the root; ProgrammingError at / (, 'Invalid use of group function') Template error (at line 38) In template /Users/bingobob/Sites/zilbo/common/forum/templates/forum/main_page.html, error at line 38 Caught an exception while rendering. 28 {% latest_conversations conv 10 %} 29 30 {% for c in conv %} 31 {{ c.forum.name }} {{ c.name }} 32 {% endfor %} 33 34 35 36 37 Most Popular 38 {% popular_objects Conversation c_o 40 %} 39 40 {% for a in c_o %} 41 {{ a.0.name }} 42 {% endfor %} 43 44 45 46 47 48 {% endblock %} The actual SQL generated is; select content_type_id, object_id, sum( unique_views) from counter_objecthourcounter where site_id=1 and effective_date >= '2006-07-18 09:12:08' and content_type_id in (30) order by sum( unique_views ) desc LIMIT 40 Is this a simple thing that I can fix (ie I've done something stupid), or do I need to include more traceback information? Cheers for any help, Tone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---