Python字符串最多需要1个参数(给定2个)

时间:2016-06-19 16:03:03

标签: python python-imaging-library pillow steganography

我正在使用stegano模块进行项目。 Stegano在python3中编程,我的项目是python2。我的程序抛出错误:类型:异常错误,Python字符串在模块的第41行最多需要1个参数(2个给定)

from base64 import b64encode
    if secret_file != None:
        with open(secret_file, "r") as f:
            secret_message = f.read()
    text = compress(b64encode(secret_message))
    img = Image.open(input_image_file) # line 41
    if "exif" in img.info:
        exif_dict = piexif.load(img.info["exif"])
    else:
        exif_dict = {}
        exif_dict["0th"] = {}
    exif_dict["0th"][piexif.ImageIFD.ImageDescription] = text

我找到this answer on stackoverflow,但由于字节已被完全删除,因此我不知道它是如何应用的。

编辑:Stacktrace- first image second image

0 个答案:

没有答案