Unable to Export bvh files

I hope I posted this to the correct place. I am a relative newbie to Blender, and I am trying to create some animations for use in Second Life. I have completed animating my figure, but I can’t seem to export the file in BVH format. The error message I get appears to be:
“UnboundLocalError: local variable key referenced before assignment”

I am using Blender 2.57.1 64-bit installation on Windows 7 x64.

I am really new to this, and to be honest I am not 100% sure I am following the correct procedure for this, but I have not been able to find any documentation on the subject either, so any suggestions or advice would be greatly appreciated.

Well… I have the same issue, now a year later :stuck_out_tongue: I used to be able to export from my character but now it seems like the file has broken or something. Doesn’t anybody have a solution for this? Looking at the error message it looks like the variable that should hold the location of the file hasn’t been assigned before the actual file.write is called, which of course causes an error. I am therefor sure it is a bug in the code but I am not really asking for a fix (even though that would be awesome), a simple workaround will do so I can continue exporting as usual :smiley: :wink:

Same Error, here is the error i get:
I don’t understand because, if i create a new bone, or a new skeleton, i can export it normally. :S

I found the problem I had was due to some parents missing in the hip bones, you should check all the bones and verify they all have parents.