Hi,

Thanks for files. It is strange that debug mode does not work
properly, I colud only see ERROR messages :? Anyway I have reproduced
it locally (see pytrainer_22_debug.txt attached) and the problem seems
related to record.summaryFromGPX method.

I need more testing to be sure that I don't ruin anything else O:)

2013/6/1 mgollo <go...@fsfe.org>:
> * David García Granda <notificati...@github.com> [130601 17:29,
>   mID <pytrainer/pytrainer/issues/22/18791...@github.com>]:
>
>> Could you please provide log files in debug mode (see
>> https://github.com/pytrainer/pytrainer/wiki/FAQ#it-doesnt-work-what-should-i-do)
>> and tcx source file for further investigation?
>
> Sorry for not reading the FAQ in the first place :-(
>
> Here's the output from the command line:
>
> [martin@platinum:~]> pytrainer -d
> running pytrainer from egg installation
> data_path: /usr/share/pytrainer/
> gettext_path: /usr/share/locale
> site_path: /usr/lib/python2.7/site-packages
> ERROR:root:Failed when retrieving Max Heartrate value: invalid literal for 
> int() with base 10: ''
> ERROR:root:Failed when retrieving Min Heartrate value: invalid literal for 
> int() with base 10: ''
> ERROR:root:GPS Device import not yet implemented
> #612@/usr/share/pytrainer/plugins/garmin-fit/bin/fit2tcx: 
> Garmin::FIT::fetch_header#538@/usr/share/pytrainer/plugins/garmin-fit/bin/Garmin/FIT.pm:
>  /home/martin/Documents/training/2013-06-01-085104.tcx: not a .FIT header 
> (\x72\x73\x69\x6F ne '.FIT')
>
> Attached are the log file, the gpx file from ~/.pytrainer/tmp and the
> original tcx file.

2013-06-02 13:18:43,247|DEBUG|windowimportdata|init_tab|>>
2013-06-02 13:18:43,248|DEBUG|windowimportdata|init_tab|page: 1 first: True
2013-06-02 13:18:43,248|DEBUG|windowimportdata|init_file_tab|>>
2013-06-02 13:18:43,249|DEBUG|windowimportdata|updateStatusbar|Setting 
statusbar statusbarImportFile to Ningún fichero seleccionado
2013-06-02 13:18:43,249|DEBUG|windowimportdata|init_file_tab|>>
2013-06-02 13:18:43,249|DEBUG|windowimportdata|new|<<
2013-06-02 13:18:45,174|DEBUG|windowimportdata|on_buttonSelectFiles_clicked|>>
2013-06-02 13:18:52,649|DEBUG|windowimportdata|on_buttonSelectFiles_clicked|1 
files selected
2013-06-02 13:18:52,650|DEBUG|windowimportdata|validateFile|>>
2013-06-02 13:18:52,650|DEBUG|windowimportdata|updateStatusbar|Setting 
statusbar statusbarImportFile to Comprobando tipo de fichero: 
/home/david/pytrainer_issue_22/2013-06-01-085104.tcx
2013-06-02 13:18:52,672|DEBUG|windowimportdata|validateFile|File filelist: 
['/usr/share/pytrainer/imports/file_garminfit.py', 
'/usr/share/pytrainer/imports/file_garmintcxv1.py', 
'/usr/share/pytrainer/imports/file_garmintcxv2.py', 
'/usr/share/pytrainer/imports/file_garmintools.py', 
'/usr/share/pytrainer/imports/file_gpxplus.py', 
'/usr/share/pytrainer/imports/file_gpxplusNokia.py', 
'/usr/share/pytrainer/imports/file_kml20.py']
2013-06-02 13:18:52,672|DEBUG|windowimportdata|validateFile|Trying: 
file_garminfit
2013-06-02 13:18:52,682|DEBUG|file_garminfit|testFile|>>
2013-06-02 13:18:52,682|DEBUG|file_garminfit|testFile|Testing 
/home/david/pytrainer_issue_22/2013-06-01-085104.tcx
2013-06-02 13:18:52,683|DEBUG|file_garminfit|fromFIT2TCXv2|>>
2013-06-02 13:18:53,404|DEBUG|file_garminfit|fromFIT2TCXv2|<<
2013-06-02 13:18:53,407|DEBUG|file_garminfit|testFile|Traceback: Traceback 
(most recent call last):
  File "/usr/share/pytrainer/imports/file_garminfit.py", line 115, in testFile
    xmldoc = etree.fromstring(self.fromFIT2TCXv2(filename))
  File "lxml.etree.pyx", line 2993, in lxml.etree.fromstring 
(src/lxml/lxml.etree.c:62557)
  File "parser.pxi", line 1617, in lxml.etree._parseMemoryDocument 
(src/lxml/lxml.etree.c:92539)
  File "parser.pxi", line 1495, in lxml.etree._parseDoc 
(src/lxml/lxml.etree.c:91352)
  File "parser.pxi", line 1011, in lxml.etree._BaseParser._parseDoc 
(src/lxml/lxml.etree.c:88025)
  File "parser.pxi", line 577, in 
lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:83766)
  File "parser.pxi", line 676, in lxml.etree._handleParseResult 
(src/lxml/lxml.etree.c:84869)
  File "parser.pxi", line 627, in lxml.etree._raiseParseError 
(src/lxml/lxml.etree.c:84362)
XMLSyntaxError: None

2013-06-02 13:18:53,408|DEBUG|windowimportdata|validateFile|Trying: 
file_garmintcxv1
2013-06-02 13:18:53,419|DEBUG|file_garmintcxv1|__init__|init
2013-06-02 13:18:53,420|DEBUG|file_garmintcxv1|testFile|>>
2013-06-02 13:18:53,420|DEBUG|file_garmintcxv1|testFile|Testing 
/home/david/pytrainer_issue_22/2013-06-01-085104.tcx
2013-06-02 13:18:53,469|DEBUG|windowimportdata|validateFile|Trying: 
file_garmintcxv2
2013-06-02 13:18:53,481|DEBUG|file_garmintcxv2|testFile|>>
2013-06-02 13:18:53,481|DEBUG|file_garmintcxv2|testFile|Testing 
/home/david/pytrainer_issue_22/2013-06-01-085104.tcx
2013-06-02 13:18:53,506|DEBUG|file_garmintcxv2|validate|>>
2013-06-02 13:18:53,516|DEBUG|file_garmintcxv2|validate|<<
2013-06-02 13:18:53,558|DEBUG|file_garmintcxv2|testFile|Valid TCXv2 file 
(/home/david/pytrainer_issue_22/2013-06-01-085104.tcx)
2013-06-02 13:18:53,560|DEBUG|file_garmintcxv2|buildActivitiesSummary|>>
2013-06-02 13:18:53,560|DEBUG|file_garmintcxv2|getActivities|>>
2013-06-02 13:18:53,562|DEBUG|file_garmintcxv2|getActivities|<<
2013-06-02 13:18:53,565|DEBUG|file_garmintcxv2|inDatabase|>>
2013-06-02 13:18:53,565|INFO|file_garmintcxv2|inDatabase|Checking if activity 
from 2013-06-01 06:51:04+00:00 exists in db
2013-06-02 13:18:53,567|DEBUG|file_garmintcxv2|inDatabase|<<
2013-06-02 13:18:53,567|DEBUG|file_garmintcxv2|getDetails|>>
2013-06-02 13:18:53,571|DEBUG|file_garmintcxv2|getDetails|Lap distance (m): 
0.000000 | duration (s): 6150.480000
2013-06-02 13:18:53,571|DEBUG|file_garmintcxv2|getDetails|Activity distance 
(m): 0.000000 | duration (hh:mm:ss - s): 01:42:30 - 6150.480000
2013-06-02 13:18:53,571|DEBUG|file_garmintcxv2|getDetails|<<
2013-06-02 13:18:53,572|DEBUG|file_garmintcxv2|buildActivitiesSummary|<<
2013-06-02 13:18:53,572|DEBUG|file_garmintcxv2|testFile|<<
2013-06-02 13:18:53,572|DEBUG|windowimportdata|validateFile|<<
2013-06-02 13:18:53,573|DEBUG|windowimportdata|updateStatusbar|Setting 
statusbar statusbarImportFile to Tipo de fichero encontrado: Versión 2 del 
fichero Garmin training center database
2013-06-02 
13:18:53,573|DEBUG|windowimportdata|on_buttonSelectFiles_clicked|Found file of 
type: Versión 2 del fichero Garmin training center database
2013-06-02 13:18:53,573|DEBUG|windowimportdata|on_buttonSelectFiles_clicked|1 
activities in file: /home/david/pytrainer_issue_22/2013-06-01-085104.tcx
2013-06-02 13:18:53,574|DEBUG|windowimportdata|on_buttonSelectFiles_clicked|<<
2013-06-02 13:19:38,983|DEBUG|windowimportdata|on_buttonFileImport_clicked|>>
2013-06-02 13:19:38,984|DEBUG|windowimportdata|getSelectedActivities|Added 
activity <gtk.TreeModelRow object at 0x35ad7d8> to selected list
2013-06-02 13:19:39,034|DEBUG|windowimportdata|getSelectedActivities|Found 1 
selected activities to import
2013-06-02 13:19:39,035|DEBUG|windowimportdata|updateStatusbar|Setting 
statusbar statusbarImportFile to Importando una actividad
2013-06-02 
13:19:39,036|DEBUG|windowimportdata|on_buttonFileImport_clicked|Importando una 
actividad
2013-06-02 
13:19:39,039|DEBUG|windowimportdata|importSelectedActivities|Checking if 
activities are already present in database...
2013-06-02 
13:19:39,040|DEBUG|windowimportdata|importSelectedActivities|Importing 1 
activities
2013-06-02 13:19:39,040|DEBUG|record|newMultiRecord|>>
2013-06-02 13:19:39,040|DEBUG|sport|get_all_sports|Retrieved all sports (4 
results).
2013-06-02 13:19:39,041|DEBUG|windowrecord|__init__|>>
2013-06-02 13:19:39,041|DEBUG|windowrecord|__init__|Using US system: False
2013-06-02 13:19:39,108|DEBUG|equipment|_get_equipment|Retrieving all equipment 
(condition: 'active = 1').
2013-06-02 13:19:39,110|DEBUG|windowrecord|__init__|<<
2013-06-02 13:19:39,110|DEBUG|windowrecord|populateMultiWindow|>>
2013-06-02 13:19:39,346|DEBUG|windowrecord|show_treeviewEntries_row|>>
2013-06-02 13:19:39,362|DEBUG|windowrecord|update_activity_data|>>
2013-06-02 13:19:39,363|DEBUG|record|summaryFromGPX|>>
2013-06-02 13:19:39,363|DEBUG|gpx|__init__|>>
2013-06-02 
13:19:39,363|DEBUG|gpx|__init__|/usr/share/pytrainer/|/home/david/.pytrainer/tmp/garmin-tcxv2-0-0.gpx|None
2013-06-02 13:19:39,363|DEBUG|gpx|__init__|parsing content from 
/home/david/.pytrainer/tmp/garmin-tcxv2-0-0.gpx
2013-06-02 13:19:39,364|DEBUG|gpx|__init__|Importing version 1.1 gpx file
2013-06-02 13:19:39,364|DEBUG|gpx|__init__|getting values...
2013-06-02 13:19:39,365|DEBUG|gpx|_getValues|>>
2013-06-02 13:19:39,365|INFO|gpx|_getValues|Lap distance: 0.0000000 m | 
Duration: 6150.48 s | Calories: 0 kcal
2013-06-02 13:19:39,365|INFO|gpx|_getValues|Laps - Distance: 0.00 km | 
Duration: 6150 s | Calories: 0 kcal
2013-06-02 13:19:39,366|DEBUG|gpx|_getValues|No trkpoints found in file
2013-06-02 13:19:39,366|DEBUG|gpx|__init__|<<
2013-06-02 13:19:39,366|DEBUG|gpx|getStartTimeFromGPX|>>
2013-06-02 
13:19:39,367|DEBUG|gpx|getStartTimeFromGPX|/home/david/.pytrainer/tmp/garmin-tcxv2-0-0.gpx
 | 2013-06-01T06:51:04Z | 2013-06-01T06:51:04Z | 2013-06-01 08:51:04+02:00
2013-06-02 13:19:39,368|DEBUG|gpx|getStartTimeFromGPX|<<
2013-06-02 13:19:39,368|DEBUG|record|summaryFromGPX|summary: {'date_time_utc': 
'2013-06-01T06:51:04Z', 'rcd_unegative': 0, 'rcd_sport': 'Biking', 
'rcd_calories': 0, 'rcd_pace': '0', 'rcd_gpxfile': 
'/home/david/.pytrainer/tmp/garmin-tcxv2-0-0.gpx', 'rcd_maxvel': 0, 
'rcd_title': '', 'rcd_maxbeats': 0, 'rcd_time': [1, 42, 30], 'rcd_date': '', 
'rcd_average': 0.0, 'date_time_local': datetime.datetime(2013, 6, 1, 8, 51, 4, 
tzinfo=tzlocal()), 'rcd_distance': '0.00', 'rcd_comments': '', 'rcd_maxpace': 
'0', 'rcd_upositive': 0, 'rcd_beats': 0}
2013-06-02 13:19:39,368|DEBUG|record|lapsFromGPX|>>
2013-06-02 13:19:39,369|DEBUG|gpx|getLaps|>>
2013-06-02 13:19:39,369|DEBUG|gpx|getLaps|Found 1 laps
2013-06-02 13:19:39,370|INFO|gpx|getLaps|Found time: 6150.4800000, start lat: , 
start lon: , end lat:  end lon:  cal: 0 dist: 0.0000000 
2013-06-02 13:19:39,370|DEBUG|gpx|getLaps|MaximumSpeed: 0.0000000
2013-06-02 13:19:39,371|DEBUG|gpx|getLaps|AverageHeartRateBpm: 137
2013-06-02 13:19:39,371|DEBUG|gpx|getLaps|MaximumHeartRateBpm: 195
2013-06-02 13:19:39,371|INFO|gpx|getLaps|Intensity: active | Trigger: manual | 
Max speed: 0.0000000 | Average hr: 137 | Maximum hr: 195
2013-06-02 13:19:39,372|DEBUG|gpx|getLaps|<<
2013-06-02 13:19:39,372|DEBUG|record|lapsFromGPX|<<
2013-06-02 13:19:39,372|DEBUG|record|summaryFromGPX|<<
2013-06-02 13:19:39,373|DEBUG|windowrecord|update_activity_data|<<
2013-06-02 13:19:39,374|DEBUG|windowrecord|show_treeviewEntries_row|<<
2013-06-02 13:19:39,374|DEBUG|windowrecord|populateMultiWindow|<<
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Pytrainer-devel mailing list
Pytrainer-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytrainer-devel

Reply via email to