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的更多相关文章

  1. Matplotlib ValueError: _getfullpathname: embedded null character

    Traceback (most recent call last): File "<stdin>", line 1, in <module> File &q ...

  2. keras 报错 ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float32: 'Tensor("embedding_1/random_uniform:0", shape=(5001, 128), dtype=float32)'

    在服务器上训练并保存模型,复制到本地之后load_model()报错: ValueError: Tensor conversion requested dtype int32 for Tensor w ...

  3. dbfread报错ValueError错误解决方法

    问题 我在用dbfread处理.dbf数据的时候出现了报错 ValueError("could not convert string to float: b'.'",) 然后查找. ...

  4. moviepy音视频剪辑VideoClip类fl_image方法image_func报错ValueError: assignment destination is read-only解决办法

    ☞ ░ 前往老猿Python博文目录 ░ moviepy音视频剪辑模块的视频剪辑基类VideoClip的fl_image方法用于进行对剪辑帧数据进行变换. 调用语法:fl_image(self, im ...

  5. java selenium启动火狐浏览器报错:Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:14.666Z

    Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA Build in ...

  6. 【转】报错:Program "sh" not found in PATH

    原文网址:http://www.cnblogs.com/SadNight/p/3406201.html (1) 报错:Program "sh" not found in PATH ...

  7. 诡异错误一: ValueError: embedded null character

    使用如下语句读取名为0_xx.txt 文件时,遇到错误  ValueError: embedded null character if __name__ == '__main__': fr = ope ...

  8. activiti报错ProcessEngines.getDefaultProcessEngine()为null

    activiti报错ProcessEngines.getDefaultProcessEngine()为null 文件名错误,默认加载classpath下面的activiti.cfg.xml,而不是ac ...

  9. Mysql报错java.sql.SQLException:null,message from server:"Host '27,45,38,132' is not allowed to connect

    Mysql报错java.sql.SQLException:null,message from server:"Host '27,45,38,132' is not allowed to co ...

随机推荐

  1. 通过request获取ID地址的方法

    // 获取IP地址 public static String getIpAddr(HttpServletRequest request) {  String ip = request.getHeade ...

  2. Hibernate学习---第七节:关联关系

    一.关联关系一对一外键(双向) 1.实体类,代码如下: package learn.hibernate.bean; import java.util.Date; /** * 持久化类设计 * 注意: ...

  3. Linux下system函数

    http://www.jb51.net/article/40517.htm   浅析如何在c语言中调用Linux脚本 http://blog.csdn.net/koches/article/detai ...

  4. Django 文件下载功能

    def file_download(request): con= MySQLdb.connect(host='192.168.xxx.xxx',user='root',passwd='xxxx',db ...

  5. http接口测试框架-python

    简单分解一下 接口测试框架设计: 主入口 -> 遍历接口/用例 -> 发送请求+接收响应 ->结果的对比 -> 生成报告 ->发送email 分成几大类:主入口的py文件 ...

  6. android之VideoView和视频播放View的扩展

    1.概念及扩展 VideoView 是android 系统提供的一个媒体播放显示和控制的控件.其结构层次如下: 原型:VideoView extends SurfaceView implements  ...

  7. php各种验证类

    <?php /**  * 验证类  *  */ class VerifyAction{     /**      * 是否为空值      */       public static func ...

  8. pytorch 调用forward 的具体流程

    forward方法的具体流程: 以一个Module为例:1. 调用module的call方法2. module的call里面调用module的forward方法3. forward里面如果碰到Modu ...

  9. hdu 4372 Count the Buildings —— 思路+第一类斯特林数

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=4372 首先,最高的会被看见: 然后考虑剩下 \( x+y-2 \) 个被看见的,每个带了一群被它挡住的楼, ...

  10. centos6.5升级默认的Mysql到5.5方法

    0.用lsb_release -a 查看linux系统的版本 1.官网下载bundle或rpm版2.解压 tar -xvf MySQL-xxx.tar或 MySQL-server-xxx.rpm和My ...