エラー内容

can only concatenate str (not "NoneType") to str

 

発生条件/原因/対処法

Noneをstrに変換しようとして発生するエラー。

is None で判定するか、そもそもNoneを返さないようにするか対応する。