Where can I find infromation about the needed environment of operators

system-info.txt (16.9 KB)

If am developing an AddOn. Currently I have a problemd with

After using it I get this error:
Error: Ç´£Lq
Traceback (most recent call last):
File “C:\Users\hcjev\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\XMLGenerator\SceneOperators.py”, line 1060, in execute
File “C:\Users\hcjev\Programme\Blender Foundation\Blender\2_83\2.83\scripts\modules\bpy\ops.py”, line 201, in call
ret = op_call(self.idname_py(), None, kw)

location: :-1

location: :-1

XMLGenerator\SceneOperators.py", line 1060 and the lines bfore:
bpy.context.window.scene = s
bpy.context.window.workspace = bpy.data.workspaces[“Layout”]
bpy.context.area.ui_type = ‘VIEW_3D’
if bpy.context.scene.name == s.name:
print ( bpy.context.scene.name, export_name )

Hi, you can run an operator once to see how it is registered in the info window - and then typically you would be able to copy it and change any parameter as needed. Unless some operators don’t work like this and require you to swap contexts (there is another technique to swap the current running context with another context and do a fake run) but this is another topic, I just mention it just to be sure.

Based on what I tested it worked good for me.

import bpy
bpy.ops.sound.mixdown(filepath="C:\\Users\\cconst\\Desktop\\test.ogg", relative_path=True, container='OGG', codec='FLAC', format='S16')