TypeError: 'NoneType' object is not iterable

部分代码如下,运行后总是提示 Traceback (most recent call last):
File "E:\project1\src\neirongxiangguanxing.py", line 156, in
setstatus = set(statuslist)
TypeError: 'NoneType' object is not iterable,什么原因?有没有大神指导下?非常感谢

        for status in allstatus:
            dictvalue = []
            words = jieba.cut(status.gettext()[:-1])
            for word in words:
                if word not in stopwordslist:
                    dictvalue.append(word)
            allstatusdict[status.getid()] = dictvalue

        allcomments = []
        allcomments = readallcomments(inputfile)
        for comment in allcomments:
            statuslist = allstatusdict.get(comment.getid())
            setstatus = set(statuslist)
            dictcomment = []
            words = jieba.cut(comment.gettext()[:-1])
            for word in words:
                if word not in stopwordslist:
                    dictcomment.append(word)
            setcomment = set(dictcomment)

readallcomments(inputfile) 这里执行完拿到的是个空集合吧,你调试看看

对应的对象是None,没有拿到正确的对象

图片说明