"MemoryError: couldn't create PyObject" What does this mean?

width = mesh.faces[0].image.size[0]
height = mesh.faces[0].image.size[1]

here were the lines it flagged. ‘mesh’ is an instance of Mesh.

Does the image exist? Does the face have such an image assigned to it? Is the image quite a large file?


Usual meaning is a memory allocation failed. If that is the exact error msg, a quick look suggests something is buggy with Image attribute lookup.

as a side note: l33t pythonistas will write
x,y = mesh.faces[0].image.size
for reasons of both efficiency and because they can.