The line of code worked in the past, but has stopped working now that I have had to replace the computer on which the code was originally written and tested. The error message is:

Calling operator "bpy.ops.import_image.to_plane" error, could not be found

The line of code is:

    bpy.ops.import_image.to_plane(files=[{"name":BackgroundFilename, "name":BackgroundFilename}], directory=BackgroundFolder)

The variables 'BackgroundFilename' and 'BackgroundFolder' are correct. The file to which these variables refer exists and opens normally outside of python.

Checking the file properties, it is not blocked and everything seems normal.

Any suggestions would be appreciated. Thanks in advance.


1 Answer 1


Enable the addon

Go to the user preferences and enable the addon "Import Images as Planes" to make the operator registered and available to scripts.

enter image description here


Can an add-on be automatically installed and enabled?


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .