简体   繁体   English

如何停止 TypeError: '_io.TextIOWrapper' object 不可下标

[英]how to stop TypeError: '_io.TextIOWrapper' object is not subscriptable

IDK why it's giving me this error, I usually do something like this and it works. IDK为什么它给我这个错误,我通常做这样的事情并且它有效。 First time it ever did something like this.它第一次做这样的事情。

here Is my error这是我的错误

TypeError: '_io.TextIOWrapper' object is not subscriptable

this is my code这是我的代码

import time; import os


l = 0

while True:
  e = open("your code", "r")
  r = e.readlines()
  e.close
  l+=1
  if l == 1:
    l = 0
  if e[l] == "help}0{":
    print("echo}< end with >{ to print things")

I had a brain fart, I mixed up my own varibles.我脑子里放了个屁,我把自己的变量搞混了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TypeError: '_io.TextIOWrapper' object 不可订阅 - TypeError: '_io.TextIOWrapper' object is not subscriptable 读取 JSON 对象:“TypeError: &#39;_io.TextIOWrapper&#39; 对象不可下标” - Reading JSON object: "TypeError: '_io.TextIOWrapper' object is not subscriptable" 创建脚本时,:TypeError:&#39;_io.TextIOWrapper&#39;对象无法下标 - when creating script have :TypeError: '_io.TextIOWrapper' object is not subscriptable 将信息添加到文本文件,TypeError:&#39;_io.TextIOWrapper&#39;对象不可下标 - Adding information to a text file, TypeError: '_io.TextIOWrapper' object is not subscriptable 在python脚本中修复“ TypeError:&#39;_ io.TextIOWrapper&#39;对象不可下标” - Fixing “TypeError: '_io.TextIOWrapper' object is not subscriptable” in python script TypeError: &#39;_io.TextIOWrapper&#39; 对象在读取 JSON 时不可下标 - TypeError: '_io.TextIOWrapper' object is not subscriptable when reading JSON Python/Pygame 错误“TypeError: '_io.TextIOWrapper' object 不可订阅” - Python/Pygame Error "TypeError: '_io.TextIOWrapper' object is not subscriptable" 在for循环的第一次迭代之后,为什么会出现此错误(TypeError:“ _ io.TextIOWrapper”对象不可下标)? - Why am i getting this error (TypeError: '_io.TextIOWrapper' object is not subscriptable) after the first iteration of my for loop? TypeError:“ _ io.TextIOWrapper”对象不可调用 - TypeError: '_io.TextIOWrapper' object is not callable TypeError(“&#39;_ io.TextIOWrapper&#39;对象不可调用”) - TypeError(“'_io.TextIOWrapper' object is not callable”)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM