As both of these are python scripts I think that might be the culprit. You could try and reinstall it.
However, I suggest getting a brand new image on a new SD card emonSD pre built SD card Download & Change Log · openenergymonitor/emonpi Wiki · GitHub and try that.