RuntimeError: Operator bpy.ops.wm.collada_export.poll() failed, context is incorrect
Opened this issue · 0 comments
learnerandtrainer commented
Hi,
I have a obj file and I want to convert it to dae. When I do it as python script every thing is well , but when I want to make this script as rest api , it throws error like below
File "C:\Users\myalc\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\myalc\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\_compat.py", line 39, in reraise
raise value
File "C:\Users\myalc\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\myalc\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "C:\Codes\Gits\Project\ProjectServices\PythonApies\obj2collada.py", line 26, in Obj2Collada
bpy.ops.wm.collada_export(filepath=outputPath)
File "C:\Users\myalc\AppData\Local\Programs\Python\Python37\2.82\scripts\modules\bpy\ops.py", line 201, in __call__
ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.wm.collada_export.poll() failed, context is incorrect
Have been this library tested as rest api before ?
flask 1.1.2
Windows 10