Fix Python – “ERROR:root:code for hash md5 was not found” when using any hg mercurial commands

When trying to use any hg Mercurial commands on the console, I keep getting this error.
I installed Python using Homebrew and I am running Mac OS Catalina v. 10.15.1.
Any reference would be appreciated. Here is the error I’m getting:
hg commit –amend
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File “/usr/loca….