Skip to content

module 'collections' has no attribute 'Iterable' error on Python 3.10.6 #2

@xylophone21

Description

@xylophone21

https://stackoverflow.com/questions/53978542/how-to-use-collections-abc-from-both-python-3-8-and-python-2-7/

Exception has occurred: AttributeError
module 'collections' has no attribute 'Iterable'
File "C:\Users\xxx\Documents\minecraft\code\mcpi_e\util.py", line 5, in flatten
if isinstance(e, collections.Iterable) and not isinstance(e, str):
File "C:\Users\xxx\Documents\minecraft\code\mcpi_e\util.py", line 10, in flatten_parameters_to_bytestring
return b",".join(map(_misc_to_bytes, flatten(l)))
File "C:\Users\xxx\Documents\minecraft\code\mcpi_e\connection.py", line 76, in send
s = b"".join([f, b"(", flatten_parameters_to_bytestring(data), b")", b"\n"])
File "C:\Users\xxx\Documents\minecraft\code\mcpi_e\connection.py", line 101, in sendReceive
self.send(*data)
File "C:\Users\xxx\Documents\minecraft\code\mcpi_e\minecraft.py", line 399, in create
playerId= int(conn.sendReceive(b"world.getPlayerId", playerName))
File "C:\Users\xxx\Documents\minecraft\code\test.py", line 9, in
mc = Minecraft.create(serverAddress,pythonApiPort,playerName)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions