I tried it with a cube and got the same error, but I tried it with someone else's model and it did work. I wonder if Maya does something my program doesn't like.
I'll go back to the cube and see if I can find anything strange in there.
texture_path = os.path.join(model_path, material.texture_fname)
This seems to be the problem with my program. Maybe it doesn't like the fact that it has no texture.
I've got it to work. It didn't like the fact that no texture was specified.
Thanks for the help.