Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Import_Logs.py - MySQL error when trying to import logs out of date sequence #3822

Closed
JohnDeery opened this Issue · 1 comment

2 participants

John Deery Matthieu Aubry
John Deery

When using the import_logs.py script to import IIS logs (may happen for others, but haven't tested) the following occurs:

Import a log file from 2010-03-01 : No problem
run archive.php : No Problem
Import a log file from 2010-03-03 : No Problem
run archive.php : No Problem
Import an IIS log file from 2010-03-02:

0 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
 Parsing log G:\IISLOGS\W3SVC1908953133\ex110302.log...
1600 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
1600 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
1600 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
1600 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
Fatal error: Error query: SQLSTATE[01000]: Warning: 1264 Out of range value for column 'time_spent_ref_action' at row 1
 In query: INSERT  INTO piwik_log_link_visit_action (idvisit, idsite, idvisitor, server_time, idaction_url, idaction_name, idaction_url_ref, idaction_name_ref, time_spent_ref_action) VALUES (?,?,?,?,?,?,?,?,?)
Parameters: array (
  0 => '240716',
  1 => 1,
  2 => 'J|
You can restart the import of "G:\IISLOGS\W3SVC1908953133\ex110302.log" from the point it failed by specifying --skip=0 on the command line.

A similar issue occurs when trying to restart a failed log import (canceled out of import, run archive, then try to re-import) with the same error on 'time_spent_ref_action', but not sure if this is related to the same part in the script.

Keywords: import_logs.py, time_spent_ref_action

Matthieu Aubry
Owner

In 575f1af: fixes #3822
Simple fix for this ticket, by setting to 0 any negative time

John Deery JohnDeery added this to the 1.12 - The Great 1.x Backlog milestone
Matthieu Aubry mattab was assigned by JohnDeery
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.