无法截图附加到使用Windows 7机器上吉拉的Python库中的问题,截图给JIRA问题。我正在使用“rb”选项打开“.PNG”文件,但仍出现UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 208: character maps to <undefined>
错误。 也只是'r'打开文件选项文件被上传,但大小为0.0 kb。 这里是代码片段:无法附加使用JIRA Python库
from client import JIRA
jira_options={'server': JIRA_URL}
jira=JIRA(options=jira_options,basic_auth=(usrname,passwd))
issue_obj = jira.issue([new_issue_id])
fileimgpath = "C:/installers/abc.PNG"
imgfile = open(fileimgpath,"rb")
jira.add_attachment(issue_obj,imgfile,"abc.PNG")
感谢您帮助。