I am running a python script on English Wikipedia xml dump file to extract text for the Wikipedia articles. I am doing everything as told on this page. It seems a fairly straightforward task.
The script runs fine till some time and extracts some articles. But after a few hours, it starts giving this error 'Maximum template recursion'. I don't understand why. Can anyone explain how to rectify this?