dev_task
dev_task copied to clipboard
Python 3.5 Socket TypeError: a bytes-like object is required, not 'str' 错误
触动条件: 如果在python3.5运行该项目,执行shared_task任务时,数据库中task_timedtask表会记录错误信息:Python 3.5 Socket TypeError: a bytes-like object is required, not 'str' 。
原因: 查阅资料后发现,python3.5和Python2.7在套接字返回值解码上有区别,因此导致的这个错误。 不少人也遇到类似的错误。