>>>>  File "/usr/lib/python2.7/site-packages/pytrainer/stats.py", line 55,
>>>> in get_stats
>>>>    sport = self._sport_service.get_sport(r['sport'])
>>>>  File "/usr/lib/python2.7/site-packages/pytrainer/sport.py", line
>>>> 148, in get_sport
>>>>    raise ValueError("Sport id cannot be None")
>>>> ValueError: Sport id cannot be None
>>>
>>> This would happen if a record was created without having a sport
>>
>> Basically I take gpx file attached in ticket 137
>> (https://sourceforge.net/apps/trac/pytrainer/raw-attachment/ticket/137/serSession.gpx.bz2)
>> and try to import it using unified import (File->Import)
>
> The correct fix for this is to prevent records from being stored
> without a valid sport id and to provide a data migration script for
> existing invalid records. This is non-trivial so for the 1.9.0 release
> I will just do a workaround so the totals view ignores records without
> a sport id.

I've just committed the workaround for this issue in revision 875.

I notice that any record with a null sport reference does not show up
any graphs or summaries and cannot be modified at all. These records
are basically useless. As far as I can tell, any records imported via
the "file -> import" dialog will be corrupted with a null sport
reference. I will try to find a quick fix for this issue too.

 - Nathan

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Pytrainer-devel mailing list
Pytrainer-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytrainer-devel

Reply via email to