Error: Problem with the API object returned by __apiobject__ method


#1

Hello,
I’m using the Sets command in my script to select vertices via the operations union, subtract, and intersect. Every time I run the script, it selects the correct vertices, but throws this error:

Error: Problem with the API object returned by __apiobject__ method

I wasn’t able to find any more information about this error. Does anyone have a guess what might be happening and how I might fix it?

Thank you!


#2

Hi, are you using pymel ?, if that’s the case, it happens when you use cmds in some operations, so stick with pymel only


#3

Are you importing with an as like this -

import pymel.core as pm

if so, use like pm.sets