Traceback (most recent call last):
File "path/to/tornado/web.py", line 1702, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "path/to/openhtf/output/servers/station_server.py", line 369, in get
self.set_header('Content-Type', attachment.mimetype)
File "path/to/tornado/web.py", line 374, in set_header
self._headers[name] = self._convert_header_value(value)
File "path/to/tornado/web.py", line 416, in _convert_header_value
raise TypeError("Unsupported header value %r" % value)
TypeError: Unsupported header value None
The simple fix is to only send the Content-Type header when we actually know it.
This phase:
will work, but when you try to download an attachment that has an extension that https://github.com/google/openhtf/blob/c669a9cc64fd2c4e86cd3cc6431c08545156d483/openhtf/core/test_state.py#L669-L670 does not recognize, the mimetype is set to None (null in json). This makes Tornado fail on attachment download when it sets the Content-Type of the response:
The simple fix is to only send the
Content-Type
header when we actually know it.This change is