Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
JohnDeery opened this issue Mar 13, 2013 · 1 comment
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@JohnDeery
Copy link

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

@mattab
Copy link
Member

mattab commented Apr 8, 2013

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

@JohnDeery JohnDeery added this to the 1.12 - The Great 1.x Backlog milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants