编程语言
首页 > 编程语言> > python:_winreg问题

python:_winreg问题

作者:互联网

Windows注册表可能包含其名称带有嵌入空值的键

当我调用_winreg.OpenKey(key,subkey_string_with_embbeded_null)时,我收到以下错误:

TypeError: OpenKey() argument 2 must be string without null bytes or None, not str

Q1:错误的意思是python _winreg模块有一个限制,它无法打开名称为embbeded nulls的键?

Q2:我如何解决这个限制?

解决方法:

Q1:对.

Q2:下载并安装win32all.

标签:python,winreg
来源: https://codeday.me/bug/20191007/1866472.html