Can't export FBX using a script. Error: "Error writing the FBX file..."

Can't export FBX using a script. Error: "Error writing the FBX file..."

bugus
Explorer Explorer
1,705 Views
2 Replies
Message 1 of 3

Can't export FBX using a script. Error: "Error writing the FBX file..."

bugus
Explorer
Explorer

I'm getting this error on a python script that used to work. I've isolated the code to only be running the export:

cmds.file( path, force=True, type="FBX export", pr=True, es=True )

Since it last worked I have migrated to an M1 Mac computer from my Intel Mac and I've upgraded to Maya 2022 from Maya 2020. Though I tried installing Maya 2020 and testing the script there to see if it would work and I got the same error.

 

I checked to make sure that the FBX plugin is active. I also tried changing the code to use the mel FBXExport command instead of cmds.file like this:

mel.eval('FBXExport -f "{0}" -s'.format(path))

But this also doesn't work. The error message is not helpful and I am totally stumped about how to get this working again. I'd love any help or info.

0 Likes
Accepted solutions (1)
1,706 Views
2 Replies
Replies (2)
Message 2 of 3

Kahylan
Advisor
Advisor

Hi!

 

Could you post the full error message and the way you definde the "path" attribute?

 

Have a nice day!

0 Likes
Message 3 of 3

bugus
Explorer
Explorer
Accepted solution

Thanks for the response! It prompted me to test my path string. I changed it to just be the desktop and it worked so the problem was isolated. It turns out that a small error was made to the path string at some point after the code was last successfully used and I didn't notice. Thanks again!

0 Likes