audvis icon indicating copy to clipboard operation
audvis copied to clipboard

Operator bpy.ops.object.shape_key_add.poll() failed, context is incorrect

Open henning101 opened this issue 1 year ago • 2 comments

Hi everyone!

I get this error I try to generate an example:

RuntimeError: Operator bpy.ops.object.shape_key_add.poll() failed, context is incorrect
Error: Python: Traceback (most recent call last):
  File "/Users/henning/Library/Application Support/Blender/4.1/scripts/addons/audvis/ui/generator/__init__.py", line 170, in execute
    Generator(context).generate()
  File "/Users/henning/Library/Application Support/Blender/4.1/scripts/addons/audvis/ui/generator/generate.py", line 126, in generate
    lattice = self.make_lattice()
              ^^^^^^^^^^^^^^^^^^^
  File "/Users/henning/Library/Application Support/Blender/4.1/scripts/addons/audvis/ui/generator/generate.py", line 356, in make_lattice
    bpy.ops.object.shape_key_add()
  File "/Applications/Blender.app/Contents/Resources/4.1/scripts/modules/bpy/ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Operator bpy.ops.object.shape_key_add.poll() failed, context is incorrect```

Is there any way I can quickly fix this in the code?

Thank you for your help! :) Henning

henning101 avatar May 07 '24 22:05 henning101

The problem is that AudVis user interface was originally only in the panel Properties -> Scene. The same user interface is also in N-panel, which I recommend using. image

example-sk avatar May 10 '24 14:05 example-sk

What it means for you: please, use the N-panel (the left one on the screenshot). What it means for me: remove AudVis from Properties -> Scene.

example-sk avatar May 10 '24 14:05 example-sk

Properties -> Scene was removed some versions ago, closing this issue

example-sk avatar Jun 18 '25 21:06 example-sk