Bake doesn't work anymore with 4.2 LTS

I made a complex character scene and tried to bake it with command.

import bpy
sc = bpy.context.scene
bpy.ops.nla.bake(frame_start=sc.frame_start, frame_end=sc.frame_end, step=1, only_selected=False, clear_constraints=True, visual_keying=True, bake_types={'POSE'})

But this results long error which makes very little of sense to me.

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\startup\bl_operators\anim.py", line 308, in execute
    actions = anim_utils.bake_action_objects(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 129, in bake_action_objects
    return iter.send(None)
           ^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in bake_action_objects_iter
    yield tuple(iter.send(None) for iter in iter_all)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in <genexpr>
    yield tuple(iter.send(None) for iter in iter_all)
                ^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 464, in bake_action_iter
    bake_custom_properties(pbone, custom_props=custom_props[name], frame=f, group_name=name)
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 251, in bake_custom_properties
    obj[key] = value
    ~~~^^^^^
TypeError: Cannot assign a 'dict' value to the existing 'bbdObject' Group IDProperty
Error: Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\startup\bl_operators\anim.py", line 308, in execute
    actions = anim_utils.bake_action_objects(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 129, in bake_action_objects
    return iter.send(None)
           ^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in bake_action_objects_iter
    yield tuple(iter.send(None) for iter in iter_all)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in <genexpr>
    yield tuple(iter.send(None) for iter in iter_all)
                ^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\Error: Python: Traceback (most recent call last):
  File "C:\Projects\Veleho_ArtFull\WorkingFiles\Pawns\BaseMale01\Animations\idle_1h.blend\Text", line 3, in <module>
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\startup\bl_operators\anim.py", line 308, in execute
    actions = anim_utils.bake_action_objects(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 129, in bake_action_objects
    return iter.send(None)
           ^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in bake_action_objects_iter
    yield tuple(iter.send(None) for iter in iter_all)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 160, in <genexpr>
    yield tuple(iter.send(None) for iter in iter_all)
                ^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 464, in bake_action_iter
    bake_custom_properties(pbone, custom_props=custom_props[name], frame=f, group_name=name)
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy_extras\anim_utils.py", line 251, in bake_custom_properties
    obj[key] = value
    ~~~^^^^^
TypeError: Cannot assign a 'dict' value to the existing 'bbdObject' Group IDProperty
Location: C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py:109

Any ideas?

seems similar to this one:
Cannot assign a ‘dict’ value to the existing ‘bone_gizmo’ Group IDProperty - Support / Animation and Rigging - Blender Artists Community

There’s probably something that has changed in 4.2
If you think it’s a bug, please report it.

Just tested with Blender 3.6 LTS same code works just fine. However with colleague’s PC both older and newer versions work.

If it works on other pc’s with 4.2 installed, there could be a addon or extension interfering?
Maybe run Blender without any addons active, and see what happens?

If other Blender installs on the PC’s work, it’s something in your setup I’m afraid.