Skip to content

Fix yade-batch plots display in summary page

William Chèvremont requested to merge fix_batch into master

Some raw data, like plots and colorized scripts where not sended, because they was opened as text-file instead of byte.

----------------------------------------
Exception happened during processing of request from ('aaa.bbb.ccc.ddd', 57806)
Traceback (most recent call last):
  File "/usr/lib/python3.6/socketserver.py", line 317, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.6/socketserver.py", line 348, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.6/socketserver.py", line 361, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.6/socketserver.py", line 721, in __init__
    self.handle()
  File "/usr/lib/python3.6/http/server.py", line 418, in handle
    self.handle_one_request()
  File "/usr/lib/python3.6/http/server.py", line 406, in handle_one_request
    method()
  File "/data/yade/install/bin/yade-daily-batch", line 212, in do_GET
    self.sendPygmentizedFile(job.script,linenostep=5)
  File "/data/yade/install/bin/yade-daily-batch", line 273, in sendPygmentizedFile
    self.sendHttp(data,contentType='text/html;charset=utf-8;')
  File "/data/yade/install/bin/yade-daily-batch", line 247, in sendHttp
    self.wfile.write(data.encode('utf-8'))
AttributeError: 'bytes' object has no attribute 'encode'
----------------------------------------

Merge request reports