2.79b, Python version 3.6.6
Short description of error
I am setting up the network renderer, but when I send tasks to the master, I get "[Errno 32] Broken pipe".
On the master, I see:
Fra:1 Mem:16.03M (0.00M, Peak 16.03M) | Time:00:52.00 | Version check Fra:1 Mem:16.03M (0.00M, Peak 16.03M) | Time:00:52.01 | New job, missing files (1 total) Fra:1 Mem:16.03M (0.00M, Peak 16.03M) | Time:00:52.01 | Receiving job file ---------------------------------------- Exception happened during processing of request from ('172.18.0.1', 40556) Traceback (most recent call last): File "/usr/lib64/python3.6/socketserver.py", line 651, in process_request_thread self.finish_request(request, client_address) File "/usr/lib64/python3.6/socketserver.py", line 361, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib64/python3.6/socketserver.py", line 721, in __init__ self.handle() File "/usr/lib64/python3.6/http/server.py", line 418, in handle self.handle_one_request() File "/usr/lib64/python3.6/http/server.py", line 406, in handle_one_request method() File "/usr/share/blender/scripts/addons/netrender/master.py", line 794, in do_PUT self.write_file(file_path) File "/usr/share/blender/scripts/addons/netrender/master.py", line 236, in write_file length = int(self.headers['content-length']) TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Exact steps for others to reproduce the error
Set up a master and a slave, send a task from client to master.
The problem seems to happen when the client tries to send the job files. This is done in line 338 of client.py, using the request() method of HTTPConnection. The argument is a file handle, no headers are specified. The documentation of this method says:
If headers contains neither Content-Length nor Transfer-Encoding, but there is a request body, one of those header fields will be added automatically. If body is None, the Content-Length header is set to 0 for methods that expect a body (PUT, POST, and PATCH). If body is a string or a bytes-like object that is not also a file, the Content-Length header is set to its length. Any other type of body (files and iterables in general) will be chunk-encoded, and the Transfer-Encoding header will automatically be set instead of Content-Length.
So, no content-length when using a file object. It is visible from the stack trace (length = int(self.headers['content-length'])) that the master expects the content-length to be set. This leads to the exception.
I have not yet tried whether explicitly setting the content length header solves the problem.