python执行编译后的文件的时候报错SyntaxError: Non-UTF-8 code starting with '\x8b'

centos7 使用Cython编译下面文件,执行编译后的文件的时候报SyntaxError: Non-UTF-8 code starting with '\x8b' in file ext-bot-so/encrypt.cpython-36m-x86_64-linux-gnu.so on line 2, but no encoding declared; see

for details
在文件里面增加utf-8,文件编码改为utf-8(:set encoding),都试过了,都是一样


# coding=utf-8
import sys
from binascii import b2a_hex, a2b_hex
from Crypto.Cipher import AES


def encrypt(text):
    key = 'EXT-'.encode('utf-8')
    mode = AES.MODE_ECB
    if len(text.encode('utf-8')) % 16:
        add = 16 - (len(text.encode('utf-8')) % 16)
    else:
        add = 0
    text = text + ('\0' * add)
    text = text.encode('utf-8')
    cryptos = AES.new(key, mode)
    cipher_text = cryptos.encrypt(text)
    return b2a_hex(cipher_text)


ulog = encrypt(sys.argv[1])
ulog_r = str(ulog, 'utf-8')
print(ulog_r)