Fix a bug in the code for the python history post