Piwik import_logs.py error

I am getting following error message when i am importing logs to remote piwik any idea? my piwik version is 1.11.1, when i added --skip=1

./python2 /home/user1/import_logs.py --url=http://my.piwik.com/piwik --login=admin --password=123456 --skip=1 --idsite=1 /var/log/httpd/access_log
0 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
Parsing log /var/log/httpd/access_log…
79 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
79 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
79 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
79 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
Fatal error:

Fatal error: Cannot use object of type stdClass as array in /var/www/html/piwik/core/Common.php on line 640

You can restart the import of “/var/log/httpd/access_log” from the point it failed by specifying --skip=1 on the command line.

what python version do you have?

PHP 5.1.6
Python 2.7.3

Debug

2013-03-14 11:23:46,599: [DEBUG] Accepted hostnames: all
2013-03-14 11:23:46,600: [DEBUG] Piwik URL is: http://my.piwik.com/piwik
2013-03-14 11:23:46,600: [DEBUG] No token-auth specified
2013-03-14 11:23:46,600: [DEBUG] Using credentials: (login = admin, password = 70c092a6aebace0b1ea406e14da78a40)
2013-03-14 11:23:46,785: [DEBUG] Authentication token token_auth is: 1f9cfe934cb53b1ffb3477ab74906944
2013-03-14 11:23:46,786: [DEBUG] Resolver: static
0 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
2013-03-14 11:23:46,964: [DEBUG] Launched recorder
2013-03-14 11:23:46,965: [DEBUG] Launched recorder
2013-03-14 11:23:46,965: [DEBUG] Launched recorder
2013-03-14 11:23:46,966: [DEBUG] Launched recorder
Parsing log /var/log/httpd/access_log…
2013-03-14 11:23:46,966: [DEBUG] Detecting the log format
2013-03-14 11:23:46,966: [DEBUG] Format iis does not match
2013-03-14 11:23:46,966: [DEBUG] Format s3 does not match
2013-03-14 11:23:46,966: [DEBUG] Format common_complete does not match
2013-03-14 11:23:46,967: [DEBUG] Format common does not match
2013-03-14 11:23:46,967: [DEBUG] Format common_vhost does not match
2013-03-14 11:23:46,967: [DEBUG] Format ncsa_extended matches
2013-03-14 11:23:47,167: [DEBUG] cannot parse tracker response, should be valid JSON
2013-03-14 11:23:47,168: [DEBUG] Error when connecting to Piwik: <urlopen error

Fatal error: Cannot use object of type stdClass as array in /var/www/html/piwik/core/Common.php on line 640

2013-03-14 11:23:47,176: [DEBUG] cannot parse tracker response, should be valid JSON
2013-03-14 11:23:47,176: [DEBUG] Error when connecting to Piwik: <urlopen error

Fatal error: Cannot use object of type stdClass as array in /var/www/html/piwik/core/Common.php on line 640



The python is ok but could be the php version any way you get it to at least ver 5.3.x?

But i am running it from remote server. its not a piwik server. I have copy import_logs.py to one of apache server and running import from there?

Do i need PHP 5.3 on Piwik server? Or i need PHP 5.3 on apache server from where i am importing logs?

The server you are using as the import server i think would be best. The source leave it as is for now, again this is a theory so i cant guarantee it will help.

Just upgrade PHP 5.3 on Piwik server and it works!! Thanks you so much for your support!