成功解决Exception "unhandled OSError" cannot open resource File: F:\Program Files\Python\Python36\Lib\si

简介: 成功解决Exception "unhandled OSError" cannot open resource File: F:\Program Files\Python\Python36\Lib\si

解决问题


Exception "unhandled OSError"

cannot open resource

File: F:\Program Files\Python\Python36\Lib\site-packages\PIL\ImageFont.py, Line: 144




解决思路


异常“未处理的OSError”

无法打开资源

error地址:File: F:\Program Files\Python\Python36\Lib\site-packages\PIL\ImageFont.py, Line: 144




解决方法


查看调用的font文件是否存在,当调用的某个文件不存在时,就会出现这种情况!

博主经过重新定义font文件,成功解决此问题!


相关文章
|
数据库连接 Python
超越`open()`:深入理解Python的`with`语句
超越`open()`:深入理解Python的`with`语句
684 99
|
存储 安全 Java
Python File处理详解!
本文详细介绍了Python文件处理的方法及其优缺点。通过`open()`、`read()`、`write()`和`append()`等函数,Python能够轻松实现文件的创建、读取、写入及追加等操作。文章还展示了如何使用`tell()`获取文件指针位置,并提供了涵盖文件创建、读取、追加、重命名及删除的完整示例。Python文件处理不仅功能强大且跨平台兼容,但也存在易错性、安全风险及处理大文件时的性能问题。适合数据存储、配置管理和数据分析等多种应用场景。
572 4
|
开发者 Python
Python学习九:file操作
这篇文章是关于Python文件操作的详细教程,包括文件的打开、读写、关闭,以及文件备份脚本的编写和文件定位操作。
332 2
|
Python
Python 中如何指定 open 编码为ANSI
Python 中如何指定 open 编码为ANSI
585 1
|
Linux Python Windows
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
442 0
|
Python
python 升级后 yum 无法使用 File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: `/usr/libexec/urlgrabber-ext-down`
python 升级后 yum 无法使用 File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: `/usr/libexec/urlgrabber-ext-down`
482 0
|
编译器 Python
成功解决We recommend that if you want Anaconda registered as your system Python, you unregister this Pyt
成功解决We recommend that if you want Anaconda registered as your system Python, you unregister this Pyt
成功解决We recommend that if you want Anaconda registered as your system Python, you unregister this Pyt
成功解决Exception: Graph file doesn't exist, path=F:\File_Python\Python_example\Human_Posture_Detection\
成功解决Exception: Graph file doesn't exist, path=F:\File_Python\Python_example\Human_Posture_Detection\
成功解决File "f:\program files\python\python36\lib\re.py", line 142, in <modul
成功解决File "f:\program files\python\python36\lib\re.py", line 142, in <modul
|
数据采集 机器学习/深度学习 人工智能
Python:现代编程的首选语言
Python:现代编程的首选语言
1950 102

推荐镜像

更多