python – NoneType和str的不支持的操作数类型
发布时间:2020-12-20 11:16:38 所属栏目:Python 来源:网络整理
导读:我收到一条消息说: Traceback (most recent call last): File "/var/www/fosa/error_supressor.py",line 46,in module sys.stderr.write(latest + 'n')TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' 我已经试图解决这个问题好几天
我收到一条消息说:
Traceback (most recent call last): File "/var/www/fosa/error_supressor.py",line 46,in <module> sys.stderr.write(latest + 'n') TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' 我已经试图解决这个问题好几天了,但说实话,我是一个多才多艺的程序员. 除此之外,当我检查我的错误日志时,我发现此错误消息,我怀疑是相关的: File "/var/www/fosa/app/controllers/client/client.py",line 601,in detail if not course.bookable or not course.school.partner.active: # both objects are boolean AttributeError: 'NoneType' object has no attribute 'bookable' 解决方法
>有些东西是绑定无最新的.弄清楚它是什么并修复你的逻辑错误. >有些东西是无约束力的.图等
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |