首页 > 代码库 > matplotlib.pyplot import报错: ValueError: _getfullpathname: embedded null character in path
matplotlib.pyplot import报错: ValueError: _getfullpathname: embedded null character in path
Environment:
Windows 10,
Anaconda 3.6
matplotlib 2.0
import matplotlib.pyplot
报错:
ValueError: _getfullpathname: embedded null character in path
原因以及Solution:
http://stackoverflow.com/questions/34004063/error-on-import-matplotlib-pyplot-on-anaconda3-for-windows-10-home-64-bit-pc
修改的文件:
Anaconda3/lib/site-packages/matplotlib/font_manager.py
修改的函数:
def win32InstalledFonts(directory=None, fontext=‘ttf‘):
try: for j in range(winreg.QueryInfoKey(local)[1]): try: key, direc, any = winreg.EnumValue( local, j) if not is_string_like(direc): continue if not os.path.dirname(direc): direc = os.path.join(directory, direc) # direc = os.path.abspath(direc).lower() direc = direc.split(‘\0‘, 1)[0] if os.path.splitext(direc)[1][1:] in fontext: items[direc] = 1
matplotlib.pyplot import报错: ValueError: _getfullpathname: embedded null character in path
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。