Closed
Description
A fixed site id resulted in an AttributeError: 'list' object has no attribute 'get'
exception.
The parameters:
python3 import_logs.py --url 'https://matomo-url.example' --token-auth 8d... --idsite 20 --log-format-name=ncsa_extended --show-progress --debug --debug-tracker /tmp/access.log.1
Reason:
The variable site
in StaticResolver
is a list of length 1, instead of a dictionary.
matomo-log-analytics/import_logs.py
Line 1646 in 5a1f5f8
Quick 'n dirty fix:
Add site = site[0]
before.
Less quick, still a bit dirty:
if len(site) > 1:
fatal_error(
"cannot find unique site with this id"
)
elif len(site) < 1:
fatal_error(
"did not find a site with siteid {:s}".format(self.site_id)
)
else:
site = site[0]
Metadata
Metadata
Assignees
Labels
No labels