nordic dfu python-3.7.0.exe 使用nrfutil.exe生成秘钥 问题

1.  File "C:\Users\yong_huang\AppData\Local\Programs\Python\Python37-32\lib\site-p
ackages\nordicsemi\dfu\util.py", line 69, in query_func
    choice = raw_input().lower()
NameError: name 'raw_input' is not defined

----------------python 3.0修改了输入的方式:

  choice = input().lower()

2.  File "C:\Users\yong_huang\AppData\Local\Programs\Python\Python37-32\lib\site-p
ackages\nordicsemi\dfu\signing.py", line 79, in gen_key
    sk_file.write(self.sk.to_pem())
TypeError: write() argument must be str, not bytes

----------------修改文件打开方式:
        with open(filename, "w") as sk_file:
            sk_file.write(self.sk.to_pem())

------>>>
        with open(filename, "wb+") as sk_file:
            sk_file.write(self.sk.to_pem())

你可能感兴趣的:(nordic dfu python-3.7.0.exe 使用nrfutil.exe生成秘钥 问题)