Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions import_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ def _call_api(self, method, **kwargs):
res = self._call('/', final_args, url=url)

try:
return json.loads(res)
return json.loads(res.decode("utf-8"))
except ValueError:
raise urllib.error.URLError('Matomo returned an invalid response: ' + res.decode("utf-8") )

Expand Down Expand Up @@ -2012,7 +2012,7 @@ def _record_hits(self, hits):

# check for invalid requests
try:
response = json.loads(response)
response = json.loads(response.decode("utf-8"))
except:
logging.info("bulk tracking returned invalid JSON")

Expand Down