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 needs upgrade to Python 3 or updated shebang line #3759

Closed
anonymous-matomo-user opened this issue Feb 16, 2013 · 8 comments
Closed
Labels
duplicate For issues that already existed in our issue tracker and were reported previously. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

Some distributions like Arch have /usr/bin/python point to python3, not Python 2.x. Even more popular distributions are transitioning to do the same thing. Currently, the import-logs.py script does not work under Python 3. As such, either it should be updated to support Python 3, either its shebang line should be changed to #!/usr/bin/python2 instead of assuming that /usr/bin/python is Python 2.x.
Keywords: log-analytics, python

@mattab
Copy link
Member

mattab commented Mar 3, 2013

sounds like a very good idea to make it python 3 compatible. Please send pull request if you manage this (btw is it possible to keep compatibility with Python 2.6?)

@anonymous-matomo-user anonymous-matomo-user added this to the 2.x - The Great Piwik 2.x Backlog milestone Jul 8, 2014
@mattab mattab removed the P: normal label Aug 3, 2014
@toholdaquill
Copy link

This issue blocks the use of the log-analytics script over HTTPS on Gandi, whose SNI config requires python 3.2+.

Since I don't want to expose my logs over a cleartext connection, that means I can't use the log-analytics script. :(

Here is what Gandi support told me:

But here is the problem. When executing the script import_log.py with python 3.2 a syntax error is returned as you can see it below:

$ ./import_logs.py --url=https://piwik.rimk.me/ ~/var/log/apache/access.log --debug

File "import_logs.py", line 562
except Piwik.Error, e:
^
SyntaxError: invalid syntax

@mattab
Copy link
Member

mattab commented Dec 5, 2014

Hi @JMPorup AFAIK it's not possible for script to support both Python 2 and python 3 unfortunately, and we must support Python 2.x still

@toholdaquill
Copy link

@mattab how much work is it to update the script to python 3? Perhaps fork the log-analytics script into log-analytics-python2 and log-analytics-python3 ?

@mattab
Copy link
Member

mattab commented Dec 7, 2014

@JMPorup no idea...

@toholdaquill
Copy link

@mattab Would you please consider looking into it? This is a major showstopping bug for me, and no doubt for many others as well. As it is, Gandi no longer recommends Piwik to their users because of this bug!

@mattab
Copy link
Member

mattab commented Dec 7, 2014

@JMPorup sorry, we can't. we don't have enough resources.

@mattab
Copy link
Member

mattab commented Mar 12, 2015

Issue was moved to the new repository for Piwik Log Analytics: https://github.com/piwik/piwik-log-analytics/issues

refs #7163

@mattab mattab closed this as completed Mar 12, 2015
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Mar 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

3 participants