Log file importer Error 'utf-8' codec can't decode byte 0x80 in position 10: invalid start byte

Hi, we are trying to import a series of requests we incurred during our upgrade from Matomo 3 to 4.4.1, and are using the log importing tool as a backup since using the QueuedTracking plugin was a pipe dream.

We are using this command

python3 misc/log-analytics/import_logs.py --replay-tracking-expected-tracker-file=piwik.php --replay-tracking --enable-http-errors --url=https://analytics.xxxxxxx.com tmp/logs/archive/09_14_2021_other_vhosts_access.log.1 --debug --debug-tracker --log-format-name=common_complete

However, we are met by another issue, where the log file importer does not import any requests due to the following error:

2021-09-14 23:18:06,359: [DEBUG] Accepted hostnames: all
2021-09-14 23:18:06,359: [DEBUG] Matomo Tracker API URL is: https://analytics.xxxxxxx.com
2021-09-14 23:18:06,359: [DEBUG] Matomo Analytics API URL is: https://analytics.xxxxxxx.com
2021-09-14 23:18:06,359: [DEBUG] No token-auth specified
2021-09-14 23:18:06,360: [DEBUG] No credentials specified, reading them from "/var/www/html/config/config.ini.php"
2021-09-14 23:18:06,421: [DEBUG] Authentication token token_auth is: xxxxxxx
2021-09-14 23:18:06,421: [DEBUG] Resolver: dynamic
0 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
2021-09-14 23:18:06,795: [DEBUG] Launched recorder
Parsing log tmp/logs/archive/09_14_2021_other_vhosts_access.log.1...
**2021-09-14 23:18:07,030: [INFO] Error when connecting to Matomo: 'utf-8' codec can't decode byte 0x80 in position 10: invalid start byte**
2021-09-14 23:18:07,031: [INFO] Retrying request, attempt number 2
1027 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
1027 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
1027 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
1027 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
1027 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
^C
Logs import summary
-------------------
    0 requests imported successfully

I tried specifying encoding as --encoding=ascii per this open bug. Any suggestions?

We are using QueuedTracking if that matters.

I was able to manually revert the encoding change in this PR and the log importer is now running. Will reply here if data shows up correctly.