Not being able to export an mmd model from blender with mmd tools

I’m having an issue with blender and can’t seem to find any help anywhere online or be able to fix this issue myself.
I can import mmd models into blender but cannot export them as a pmx/pmd. This is really, really frustrating please help! :frowning:
here’s the error message

my blender version is 2.79
and I have installed the latest version of mmd tools.