小编Moh*_*ale的帖子

TypeError:'_io.TextIOWrapper'对象不可调用,创建文本文件错误

    list = [Blarg, T2, T3]
    Rewrite(List)


    def Rewrite(New2):
        List_Length = len(New2)
        L = 0
        with open('Chronologiser2.BCF', 'w') as file_output:
            file_output('')

        while L < List_Length:
            with open('Chronologiser2.BCF', 'a') as file_output:
                Current_Text = New2[L]
                file_output(str(Current_Text) + '/n')
                L += 1
Run Code Online (Sandbox Code Playgroud)

有人可以向我解释为什么我不断收到'TypeError:'_io.TextIOWrapper'对象不可调用'错误,我伤脑筋,看着类似的问题,但还是一无所获

python error-handling

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

error-handling ×1

python ×1