Strange. Perhaps ubuntu upgraded a dependency of python 2.5 to the code that has this bug.
The error is not due to GRAMPS, but we can change the code to make things work again we believe.
The solution is in bug http://www.gramps-project.org/bugs/view.php?id=3008
and will be present in version 3.1.2 of GRAMPS which should be ready the coming weeks.
You can try the fix by editing one file. Let us know if it works for you. Do backup your gramps data first (the .gramps folder). No issues have been seen with the developers, but you never know.
So, the fix is in the file ManagedWindow.py:
Yes, you read that correctly, just add the "(object)"
To find that file on your computer, it is easiest in a terminal, where you type:
It probably will be in the directory: /usr/local/share/gramps/ManagedWindow.py
You need a root session to edit this file.
If you can wait, version 3.1.2 will have some more likewise changes we assume are beneficial. Our release manager normally also makes an ubuntu .deb package you will be able to install.