Hi there,

Apologies - just reading through the thread and I see this had follow 
up messages.  I agree that it does not resolve the statistics problem so 
I dug a little deeper.  The 'sport' index was set to '0' so I had a look 
in the database and there are no sports with an index of 0.  A few 
others had '1' and again, this was also missing.  I've fixed this in the 
DB so it doesn't crash on starting (without the proposed fix).

I'm not sure how this occurred.  I recall renaming and/or removing 
sports some time ago but do not remember the specifics.  The records 
were from 2008 and 2009, only a few.  If there is a full fix in the 
works then that's great!

Just thought I'd let you know.

Thanks,
Jason

On 11/01/12 19:31, Jason Michael Adams wrote:
> Hi,
>
> Great work, love pytrainer and have been using it for a while! I
> downloaded 1.9.1 and like some of the new features (although I notice
> graphs still show metric labelled as miles).
>
> Anyway, on upgrading I think it updated my date? It then crashes while
> examining sports (see attached). If fixed it anyway by just skipping
> over the error in stats.py.
>
> *** ./stats.py 2011-11-25 18:56:26.000000000 +0000
> --- /usr/local/lib/python2.7/dist-packages/pytrainer/stats.py 2012-01-11
> 19:16:30.000000000 +0000
> ***************
> *** 56,61 ****
> --- 56,63 ----
> continue
> if r['sport'] not in data['sports']:
> sport = self._sport_service.get_sport(r['sport'])
> + if sport is None:
> + continue
> data['sports'][r['sport']] = {'name': sport.name, 'count': 0}
> for f in fields:
> data['sports'][r['sport']][f] = 0
>
> pytrainer then starts OK, working fine so far!
>
> Keep up the good work.
>
> - Jason

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Pytrainer-devel mailing list
Pytrainer-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytrainer-devel

Reply via email to