'OSError' object has no attribute 'message'

Your traceback is the same as here PDF in invoice email - #13 by hooksie11

So follow the notes there to check that you specify the line “host_name” in your site_config.json