You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Importing our apache logs I get the following error:
Traceback (most recent call last):
File "/var/alternc/html/a/analytics/piwik/misc/log-analytics/import_logs.py", line 1663, in <module>
main()
File "/var/alternc/html/a/analytics/piwik/misc/log-analytics/import_logs.py", line 1627, in main
parser.parse(filename)
File "/var/alternc/html/a/analytics/piwik/misc/log-analytics/import_logs.py", line 1536, in parse
hit.length = int(str(format.get('length')))
ValueError: invalid literal for int() with base 10: '-'
Here is an easy fix:
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py
index 56f28c1..dcbc770 100755
--- a/misc/log-analytics/import_logs.py
+++ b/misc/log-analytics/import_logs.py
@@ -1534,7 +1534,7 @@ class Parser(object):
hit.ip = format.get('ip')
try:
hit.length = int(format.get('length'))
- except BaseFormatException:
+ except:
# Some lines or formats don't have a length (e.g. 304 redirects, IIS logs)
hit.length = 0
Thanks
The text was updated successfully, but these errors were encountered:
Importing our apache logs I get the following error:
Here is an easy fix:
Thanks
The text was updated successfully, but these errors were encountered: