社区
脚本语言
帖子详情
T系统报错peError: expected str, bytes or os.PathLike object, not NoneType
穆�丹
2019-01-28 11:45:33
在用Python中的pyinstaller把.py打包成exe文件时,就会报错:TypeError: expected str, bytes or os.PathLike object, not NoneType,这个问题该如何解决?
...全文
4202
1
打赏
收藏
T系统报错peError: expected str, bytes or os.PathLike object, not NoneType
在用Python中的pyinstaller把.py打包成exe文件时,就会报错:TypeError: expected str, bytes or os.PathLike object, not NoneType,这个问题该如何解决?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
ruancan
2019-01-28
打赏
举报
回复
看报错信息应该是某个变量没有赋值导致的,报错信息太少,看不出来
【python】Ty
pe
Error
:
ex
pe
cted
str
,
byte
s or
os
.
Path
Like
object
, not
NoneTy
pe
出现这个问题多半是没有指定路径,上述问题翻译过来是,期望一个字符串或者字节路径,而不是默认值,出现这个问题需要把指定路径的变量赋值即可。如下所示 如上所示,更改之前save_
path
=None,所以会
报错
,这种错误多半出现在运行开源代码时出现。 而
报错
的地方在需要用到路径的地方。 ...
Ty
pe
Error
:
ex
pe
cted
str
ing or
byte
s-like
object
在使用pycharm爬取网页内容的时候,出现了Ty
pe
Error
:
ex
pe
cted
str
ing or
byte
s-like
object
错误 检查之后发现 因为: re.findall(pattern,
str
ing,flag) 这里pattern匹配的是字符串,但是前面获得的html 是类型为
byte
s,只要将它转化为
str
ing类型就好了,如下: 代码就能正常运行: 欢迎使用Ma...
报错
Ty
pe
Error
: $(...).live is not a function解决方法
报错
Ty
pe
Error
: $(...).live is not a function解决方法
vue搭建路由
报错
Ty
pe
Error
:
Object
(...) is not a function
vue搭建路由
报错
Ty
pe
Error
:
Object
(…) is not a function vue-routerpackage.json文件中查看版本号过高, 将vue-router版本降低npm i vue-router@3.2.0就不会
报错
了
vue
报错
Ty
pe
Error
:
Object
(...) is not a function
控制台
报错
截图如下: 经排查,是因为引用方法没有加双引号。
脚本语言
37,718
社区成员
34,238
社区内容
发帖
与我相关
我的任务
脚本语言
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
复制链接
扫一扫
分享
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
试试用AI创作助手写篇文章吧
+ 用AI写文章