Trying to import local apache logs

When I try and run the following import I get an error and it looks like the script dumps to the console…

python /www/mstats/misc/log-analytics/import_logs.py --idsite=1 --url=http://mysite.net /var/log/mysite.net-access_log

[INFO] Error when connecting to Matomo: <urlopen error Matomo returned an invalid response: <!doctype html>

I have tried both --url=http and https and both mysite.net and www.mysite.net with the same error

apache24

page keeps refreshing with [INFO] Retrying request, attempt number 3 at bottom number incrementing