Why are sha256 encryption results different between js and python?

output base64 code after sha256 signature encryption:
JS:

const crypto = require("crypto"); 
var sign =  crypto.createHmac("sha256",secretKey).update("1234567890").digest("base64"); 
return sign //gillOqwrSirL5cH4kiL7px1hSJ5tog/NfiY5J8T/Xq0=

python:

import hmac
    mac = hmac.new(bytes(secretKey, encoding="utf8"), bytes("1234567890", encoding="utf-8"), digestmod="sha256")
    d = mac.digest()
    return base64.b64encode(d)//9c1+B5qU/NXET8TuNIR0Yh92mIowEy20W44p7IHNpE=
    

is also sha256 encryption, two programs use to sign the same secretKey, why the output of the encryption results are different?

Sep.08,2021

is the same. Test results
are you sure that the secretKey you are using is the same string? For example, newline characters and spaces will affect

I have tested nodeV0.12.0 and nodeV8.11.1 with the same results. Python is 3.7

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaa818-1fdd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaa818-1fdd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?