擅长:python、mysql、java
<p>如果您查看收到的异常消息,它会显示AttributeError:encode。这告诉你在代码路径的某个地方,有东西在某个对象上寻找一个名为“encode”的属性(或者很可能是一个方法),但是没有找到它。在</p>
<p>我怀疑您没有将正确的duck类型的对象传递给cquengine用户图像.image. 它会说PIL图像对象吗?我对此表示怀疑。我敢打赌cquengine正在寻找典型的python string method.encode(<a href="http://docs.python.org/2/library/stdtypes.html#str.encode" rel="nofollow">http://docs.python.org/2/library/stdtypes.html#str.encode</a>)。不要传递PIL图像,而是尝试只传递从表单发布中接收的原始字节。在</p>