Trying to use log method failing

I’ve been searching for two days and cannot solve this.

# ./import_logs.py --url=https://log.domain.com /var/log/httpd/ssl_access_log
Traceback (most recent call last):
  File "./import_logs.py", line 2621, in <module>
    config = Configuration()
  File "./import_logs.py", line 993, in __init__
    self._parse_args(self._create_parser())
  File "./import_logs.py", line 964, in _parse_args
    if not self.options.matomo_url:
AttributeError: Values instance has no attribute 'matomo_url'

The url is configured but I’ve not found much information on anything else that needs to be configured, especially the second one, API.

        '--url', dest='https://log.domain.com/',
        '--api-url', dest='matomo_api_url',

I have two domains set in Motomo from the gui and now am trying to import the logs from the command line which I’ll set up as a cron job. I am not able to use the java method so need this but cannot get it to work.

Any help would be very welcome and I’m happy to share what ever else you need if I have not already.

Hi,

This is really an odd error. Which python version are you using?

Hi Lukas,
It’s a new install of centos and I didn’t do anything special for python meaning, if there are additional steps I’m supposed to take to get python working or configured, I’ve not done that.

It is [python 2.7.5-80.el7 on centos 7.

Hi,

The only solution I can think of is downloading the latest version of import_logs.py
again from GitHub - matomo-org/matomo-log-analytics: Import any kind of server logs in Matomo for powerful log analytics. Universal log file parsing and reporting.

I did as you suggested and it shows the same output.
Is there something that needs to be configured for python? That’s what it looks like to me but I don’t know anything about python.