Fix python3 support for  (errors only)

Hi!

I made a patch for the python3 support. There is still a failure but errors are fixed.

Francois