python bitcoin public key to address code error
You get the error because the hexstring you provided is 127 characters long. You need to pad with zeroes.

Even if you pad with zeroes 05bd8834885082d9e9775f2084610bea79d2bd7acde2fc28b4dba85b0902ac786ef3a1fa082da527a3a51bcd71104b4e6ef91b62b2e93bcfdbc4ac7c35e9fddb is not a valid public key. It must start with 04.

The coordinates y1, y2 of your public key also do not lie on the Curve. I do not know where you got your key from but it is invalid.

The Public Key corresponding to Private Key 0x5bd8834885082d9e9775f2084610bea79d2bd7acde2fc28b4dba85b0902ac786 is 04b302d50e6afaea3eb3194fced5b12ba45aa170d2d717d5a598511a96187a7a90e8c84b1f57a822bda9ecf111374c9e92fe0d1fb5a192a45790f437828d17f009 and the P2PKH address is 14pFAXD2uQpdpToL5LS4oh1bsSGXnVpA2r