Update convert.py

make exception handling explicit