Advertisement

PyPDF2 编码问题UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xcb in position 8: invalid continuat

阅读量:

在使用PyPDF2进行编码处理时,遇到了UnicodeDecodeError错误提示,具体表现为'utf-8'编码方式无法解析位置8处的字节0xcb,提示存在无效的连续字符。今日尝试实现一个将Word文档转换为PDF的小型功能,并在添加水印过程中出现了上述错误信息。

复制代码
 024-06-11 07:37:28,347 19112 ERROR od16dms01 odoo.http: Exception during request handling.

    
 Traceback (most recent call last):
    
   File "F:\od162306\venv\lib\site-packages\PyPDF2\generic.py", line 484, in readFromStream
    
     return NameObject(name.decode('utf-8'))
    
 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcb in position 8: invalid continuation byte
    
   7. During handling of the above exception, another exception occurre

全部评论 (0)

还没有任何评论哟~