【发布时间】:2018-05-29 23:51:11
【问题描述】:
我是隐写术的新手。试图做一个测试,我得到这个错误:
'hex' is not a text encoding; use codecs.encode() to handle arbitrary codecs
我已经阅读了有关 binascii 的信息,但是我该如何进行这项工作呢?
我的代码是这个:
from __future__ import absolute_import, unicode_literals
from steganography.steganography import Steganography
path = "/Users/cohen/Desktop/Screenshot_030.png"
output_path = "/Users/cohen/Desktop/output_steganography.png"
text = "/Users/cohen/Desktop/test.txt"
Steganography.encode(path, output_path, text) #---here is the line with error
谢谢!
【问题讨论】:
-
你会要求项目维护者更新他们的代码以使用 Python 3,或者只使用 Python 2。
-
该项目目前不兼容Python 3。
-
谢谢!我教过他们的代码有些可疑。
标签: python steganography