質問編集履歴

5

discord.pyのバージョン確認できました。

2020/01/02 05:18

投稿

Sophie
Sophie

スコア12

test CHANGED
File without changes
test CHANGED
@@ -225,3 +225,29 @@
225
225
  AttributeError: module 'inspect' has no attribute 'iscoroutinefunction'
226
226
 
227
227
  ```
228
+
229
+
230
+
231
+ #pip show discord.pyの結果
232
+
233
+ ```
234
+
235
+ Name: discord.py
236
+
237
+ Version: 1.2.5
238
+
239
+ Summary: A python wrapper for the Discord API
240
+
241
+ Home-page: https://github.com/Rapptz/discord.py
242
+
243
+ Author: Rapptz
244
+
245
+ Author-email: None
246
+
247
+ License: MIT
248
+
249
+ Location: /usr/local/lib/python3.6/site-packages
250
+
251
+ Requires: aiohttp, websockets
252
+
253
+ ```

4

エラーの原因追記

2020/01/02 05:18

投稿

Sophie
Sophie

スコア12

test CHANGED
File without changes
test CHANGED
@@ -165,3 +165,63 @@
165
165
  [GCC 8.2.1 20180905 (Red Hat 8.2.1-3)]
166
166
 
167
167
  ```
168
+
169
+
170
+
171
+ #import時にエラーがでていました。
172
+
173
+ ```
174
+
175
+ >>> import discord
176
+
177
+ Traceback (most recent call last):
178
+
179
+ File "<stdin>", line 1, in <module>
180
+
181
+ File "/usr/local/lib/python3.6/site-packages/discord/__init__.py", line 23, in <module>
182
+
183
+ from .client import Client
184
+
185
+ File "/usr/local/lib/python3.6/site-packages/discord/client.py", line 27, in <module>
186
+
187
+ import asyncio
188
+
189
+ File "/usr/lib64/python3.6/asyncio/__init__.py", line 21, in <module>
190
+
191
+ from .base_events import *
192
+
193
+ File "/usr/lib64/python3.6/asyncio/base_events.py", line 19, in <module>
194
+
195
+ import inspect
196
+
197
+ File "/usr/lib64/python3.6/inspect.py", line 36, in <module>
198
+
199
+ import dis
200
+
201
+ File "/root/dis/dis.py", line 3, in <module>
202
+
203
+ from discord.ext import commands
204
+
205
+ File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/__init__.py", line 13, in <module>
206
+
207
+ from .bot import Bot, AutoShardedBot, when_mentioned, when_mentioned_or
208
+
209
+ File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 38, in <module>
210
+
211
+ from .core import GroupMixin, Command
212
+
213
+ File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 39, in <module>
214
+
215
+ from .cog import Cog
216
+
217
+ File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/cog.py", line 150, in <module>
218
+
219
+ class Cog(metaclass=CogMeta):
220
+
221
+ File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/cog.py", line 117, in __new__
222
+
223
+ elif inspect.iscoroutinefunction(value):
224
+
225
+ AttributeError: module 'inspect' has no attribute 'iscoroutinefunction'
226
+
227
+ ```

3

バージョン確認用の追記

2020/01/02 04:58

投稿

Sophie
Sophie

スコア12

test CHANGED
File without changes
test CHANGED
@@ -143,3 +143,25 @@
143
143
 
144
144
 
145
145
  [参考にさせていただいたサイト](https://qiita.com/o-chang/items/e45fb7074654f8eb26ea)
146
+
147
+
148
+
149
+ ####バージョン確認
150
+
151
+ ```python
152
+
153
+ import sys
154
+
155
+ print(sys.version)
156
+
157
+ ```
158
+
159
+ ####実行結果
160
+
161
+ ```
162
+
163
+ 3.6.8 (default, Jul 1 2019, 16:43:04)
164
+
165
+ [GCC 8.2.1 20180905 (Red Hat 8.2.1-3)]
166
+
167
+ ```

2

pythonのバージョン追記

2020/01/02 04:22

投稿

Sophie
Sophie

スコア12

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- (例)Python3でdiscordのbotを作っています。
5
+ (例)Python3.6.8でdiscordのbotを作っています。
6
6
 
7
7
  ソースを実行していると以下のエラーメッセージが発生しました。
8
8
 

1

誤字訂正

2020/01/02 04:06

投稿

Sophie
Sophie

スコア12

test CHANGED
File without changes
test CHANGED
@@ -1,8 +1,6 @@
1
1
  ### 前提・実現したいこと
2
2
 
3
3
 
4
-
5
- ここに質問の内容を詳しく書いてください。
6
4
 
7
5
  (例)Python3でdiscordのbotを作っています。
8
6