Код:
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
mc.postToChat('Hello world!')
Ошибка:
Traceback (most recent call last):
File "C:\Users\Вадим\PycharmProjects\pythonProject2\venv\new.py", line 5, in <module>
mc.postToChat('Юоюа')
File "C:\Users\Вадим\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\minecraft.py", line 163, in postToChat
self.conn.send(b"chat.post", msg)
File "C:\Users\Вадим\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\connection.py", line 39, in send
s = b"".join([f, b"(", flatten_parameters_to_bytestring(data), b")", b"\n"])
File "C:\Users\Вадим\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\util.py", line 10, in flatten_parameters_to_bytestring
return b",".join(map(_misc_to_bytes, flatten(l)))
File "C:\Users\Вадим\AppData\Local\Programs\Python\Python310\lib\site-packages\mcpi\util.py", line 5, in flatten
if isinstance(e, collections.Iterable) and not isinstance(e, str):
AttributeError: module 'collections' has no attribute 'Iterable'