diff --git a/wakatime/main.py b/wakatime/main.py index 232f4ea..6de441f 100644 --- a/wakatime/main.py +++ b/wakatime/main.py @@ -345,7 +345,7 @@ def send_heartbeat(project=None, branch=None, hostname=None, stats={}, key=None, 'Authorization': auth, } if hostname: - headers['X-Machine-Name'] = u(hostname) + headers['X-Machine-Name'] = u(hostname).encode('utf-8') proxies = {} if proxy: proxies['https'] = proxy