https://bugzilla.wikimedia.org/show_bug.cgi?id=55225
--- Comment #2 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Could you re-run the script with -v? This should output the queries used, and might give relevant information.
On a side note, why are you running pwb (or at least version.py) as root? There is no reason to do that, and it's dangerous.