Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/324.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用python编程discord BOT时出现超级错误_Python_Discord_Discord.py - Fatal编程技术网

使用python编程discord BOT时出现超级错误

使用python编程discord BOT时出现超级错误,python,discord,discord.py,Python,Discord,Discord.py,我是python新手,我正在创建一个机器人来与PyCharm产生冲突,突然下面出现了一个巨大的错误,我已经重新安装了python,尝试为python 3.7和3.6配置路径,更改了IDE并继续给出这个错误,有人能帮我找出是什么导致了这个错误吗 错误如下: C:\Users\Pichau\AppData\Local\Programs\Python\Python36\python.exe C:/Users/Pichau/Documents/cursos/programacao/Discord

我是python新手,我正在创建一个机器人来与PyCharm产生冲突,突然下面出现了一个巨大的错误,我已经重新安装了python,尝试为python 3.7和3.6配置路径,更改了IDE并继续给出这个错误,有人能帮我找出是什么导致了这个错误吗

错误如下:

    C:\Users\Pichau\AppData\Local\Programs\Python\Python36\python.exe C:/Users/Pichau/Documents/cursos/programacao/Discord/main.py
Traceback (most recent call last):
  File "C:/Users/Pichau/Documents/cursos/programacao/Discord/main.py", line 1, in <module>
    import discord
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\__init__.py", line 20, in <module>
    from .client import Client, AppInfo, ChannelPermissions
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\client.py", line 28, in <module>
    from .user import User
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\user.py", line 27, in <module>
    from .utils import snowflake_time
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\utils.py", line 31, in <module>
    import asyncio
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\asyncio\__init__.py", line 21, in <module>
    from .base_events import *
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\asyncio\base_events.py", line 17, in <module>
    import concurrent.futures
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\concurrent\futures\__init__.py", line 8, in <module>
    from concurrent.futures._base import (FIRST_COMPLETED,
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\concurrent\futures\_base.py", line 7, in <module>
    import logging
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\logging\__init__.py", line 26, in <module>
    import sys, os, time, io, traceback, warnings, weakref, collections
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\traceback.py", line 5, in <module>
    import linecache
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\linecache.py", line 11, in <module>
    import tokenize
  File "C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\tokenize.py", line 41, in <module>
    __all__ = token.__all__ + ["COMMENT", "tokenize", "detect_encoding",
AttributeError: module 'token' has no attribute '__all__'

Process finished with exit code 1
C:\Users\Pichau\AppData\Local\Programs\Python\Python36\Python.exe C:/Users/Pichau/Documents/cursos/programacao/Discord/main.py
回溯(最近一次呼叫最后一次):
文件“C:/Users/Pichau/Documents/cursos/programacao/Discord/main.py”,第1行,在
进口不和
文件“C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\site packages\discord\\uuuuu init\uuuuu.py”,第20行,在
from.client导入客户端、AppInfo、ChannelPermissions
文件“C:\Users\Pichau\AppData\Local\Programs\Python\36\lib\site packages\discord\client.py”,第28行,在
从用户导入用户
文件“C:\Users\Pichau\AppData\Local\Programs\Python\36\lib\site packages\discord\user.py”,第27行,在
从.utils导入雪花\u时间
文件“C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\site packages\discord\utils.py”,第31行,在
导入异步
文件“C:\Users\Pichau\AppData\Local\Programs\Python\36\lib\asyncio\\uuuu init\uuuu.py”,第21行,在
从.base\u事件导入*
文件“C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\asyncio\base\u events.py”,第17行,在
进口期货
文件“C:\Users\Pichau\AppData\Local\Programs\Python\36\lib\concurrent\futures\\uuuuu init\uuuu.py”,第8行,在
从concurrent.futures.\u基本导入(第一次完成,
文件“C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\concurrent\futures\\u base.py”,第7行,在
导入日志记录
文件“C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\logging\ \uuuuu init\uuuu.py”,第26行,在
导入系统、操作系统、时间、io、回溯、警告、weakref、集合
文件“C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\traceback.py”,第5行,在
导入行缓存
文件“C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\linecache.py”,第11行,在
导入标记化
文件“C:\Users\Pichau\AppData\Local\Programs\Python\Python36\lib\tokenize.py”,第41行,在
__all\uuuuuu=token.\uuuuu all\uuuuuuu+[“注释”、“标记化”、“检测编码”,
AttributeError:模块“令牌”没有属性“\uuuu all\uuuuuu”
进程已完成,退出代码为1

我会检查代码,除非它不允许,否则你可能应该将代码放在记事本中,保存它,然后删除文件,然后重试。这可能是计算机错误,而不是编码错误。

你有一个名为
token.py
的文件吗?请参阅:可能是重复的:这似乎不太可能。怎么回事?我怎么知道看着这个错误…这就是我发现的。这相当于在你肩上撒盐和交叉手指。我想你可以这么说,但从我看到的情况来看,它的代码有问题,而且库也在里面。