首页 > 编程语言 >[python] TypeError: expected str, bytes or os.PathLike object, not NoneType

[python] TypeError: expected str, bytes or os.PathLike object, not NoneType

时间:2023-01-04 12:00:10浏览次数:39  
标签:TypeError PathLike python 路径 object 报错 expected

参考链接:https://blog.csdn.net/weixin_42345113/article/details/104514545

出现这个问题多半是没有指定路径,上述问题翻译过来是,期望一个字符串或者字节路径,而不是默认值,出现这个问题需要把指定路径的变量赋值即可。如下所示

 

 

 

如上所示,更改之前save_path=None,所以会报错,这种错误多半出现在运行开源代码时出现。

而报错的地方在需要用到路径的地方。

 

 



标签:TypeError,PathLike,python,路径,object,报错,expected
From: https://www.cnblogs.com/happystudyeveryday/p/17024441.html

相关文章