AttributeError: module 'collections' has no attribute 'Iterable'

37 views
Skip to first unread message

kyntros

unread,
Jan 7, 2023, 3:06:05 PM1/7/23
to Adventures in Minecraft Forum
hello,

I'm testing currently your 3rd edition and I have the following error at the begining of the book :
Traceback (most recent call last):
  File "C:\Users\xxxx\OneDrive\Bureau\AdventuresInMinecraft-PC\MyAdventures\HelloWorldMinecraft.py", line 3, in <module>
    mc.postToChat("Bienvenue sur les terres d'Argelius")
  File "C:\Users\xxxx\OneDrive\Bureau\AdventuresInMinecraft-PC\MyAdventures\mcpi\minecraft.py", line 197, in postToChat
    self.conn.send(b"chat.post", msg)
  File "C:\Users\xxxx\OneDrive\Bureau\AdventuresInMinecraft-PC\MyAdventures\mcpi\connection.py", line 39, in send
    s = b"".join([f, b"(", flatten_parameters_to_bytestring(data), b")", b"\n"])
  File "C:\Users\xxxx\OneDrive\Bureau\AdventuresInMinecraft-PC\MyAdventures\mcpi\util.py", line 10, in flatten_parameters_to_bytestring
    return b",".join(map(_misc_to_bytes, flatten(l)))
  File "C:\Users\xxxx\OneDrive\Bureau\AdventuresInMinecraft-PC\MyAdventures\mcpi\util.py", line 5, in flatten
    if isinstance(e, collections.Iterable) and not isinstance(e, str):
AttributeError: module 'collections' has no attribute 'Iterable'

any help on this topic?

kyntros

unread,
Jan 7, 2023, 3:16:26 PM1/7/23
to Adventures in Minecraft Forum
setup :
win 10 
python 3.10

client 1.12
server 1.12

kyntros

unread,
Jan 7, 2023, 4:33:16 PM1/7/23
to Adventures in Minecraft Forum
solved by downloading older version of python.

advise to myselsf better to use 3.6.7.rc2 : https://www.python.org/ftp/python/3.6.7/python-3.6.7rc2.exe

Reply all
Reply to author
Forward
0 new messages