TypeError: expected str, bytes or os.PathLike object, not module

目录

TypeError: expected str, bytes or os.PathLike object, not module

#问题:

#解决:

#完整错误:


#问题:

未提供path的实际值;

with open(path, 'r') as f:encoding = f.encoding df = pd.read_csv(path,sep=sep, encoding=encoding)

#解决:

提供文件读取的路径;

path = "D:\\test\\repo\\data.csv"

path = "D:\\test\\repo\\data.csv"with open(path, 'r') as f:encoding = f.encoding df = pd.read_csv(path,sep=sep, encoding=encoding)

#完整错误:

Traceback (most recent call last):
  File "test.py", line 89, in <module>
    data = process(data_dir)
  File "deploy+test.py", line 22, in inference_process
    with open(path, 'r') as f:
TypeError: expected str, bytes or os.PathLike object, not module

参考:python

参考:pandas

TypeError: expected str, bytes or os.PathLike object, not module相关推荐

  1. pip安装库包遇到错误:TypeError: expected str, bytes or os.PathLike object, not int 的解决方法

    1 问题描述 1.在安装python3的库包时候,遇到和os模块相关的错误:TypeError: expected str, bytes or os.PathLike object, not int, ...

  2. 解决HuggingFace加载预训练模型时报错TypeError: expected str, bytes or os.PathLike object, not NoneType

    完整报错: TypeError: expected str, bytes or os.PathLike object, not NoneType 解决方法 检查下载的组件: 步骤1:完整的下载组件,包 ...

  3. TypeError: expected str, bytes or os.PathLike object, not int(解决方法)

    在使用 pip 安装软件时,报错如下 $ pip install numpy Exception: Traceback (most recent call last):   File "/u ...

  4. PyQt:成功解决Exception quot;unhandled TypeErrorquot; expected str, bytes or os.PathLike object, no

    PyQt:成功解决Exception "unhandled TypeError" expected str, bytes or os.PathLike object, no 目录 ...

  5. Django 遇到的错误:expected str, bytes or os.PathLike object, not _io.TextIOWrapper

    1.由于在开发一个导出pdf的功能,在之前已经写过一篇所遇到的错误记录文档,文章链接如下:https://blog.csdn.net/u012561176/article/details/836552 ...

  6. Pyinstaller封装exe-TypeError: expected str, bytes or os.PathLike object, not NoneType

    在项目根目录下按照下面路径打开, \venv\Lib\site-packages\PyInstaller\depend\bindepend.py 搜索 Applies only to non Wind ...

  7. TypeError: the JSON object must be str, bytes or bytearray, not dict

    TypeError: the JSON object must be str, bytes or bytearray, not dict 目录 TypeError: the JSON object m ...

  8. 成功解决TypeError: sequence item 0: expected str instance, bytes found

    成功解决TypeError: sequence item 0: expected str instance, bytes found 目录 解决问题 解决思路 解决方法 解决问题 TypeError: ...

  9. Failed to include caffe_pb2, things might go wrong! ... TypeError: expected bytes, str found

    使用python的caffe的时候,出现下面的问题: Failed to include caffe_pb2, things might go wrong! Traceback (most recen ...

最新文章

  1. Linq 无法删除尚未附加的实体的问题
  2. 如何使用Git提高研发团队工作效率?
  3. 生信人写程序2. Editplus添加Perl, Shell, R模板和语法高亮
  4. 显示电池电量的小工具
  5. win7 curl安装
  6. 别说我不会玩,我来告诉你iPhone有多烂!iPhone缺点集
  7. 天梯—输出GPLT(C语言)
  8. NLP基础—2.文本预处理
  9. 模板引擎 - Thymeleaf
  10. WebDriver与浏览器版本对应关系
  11. 最高效的XML解析方式-----Simple 简化 XML 解析
  12. html如何根据颜色排序,Excel技巧:按颜色排序或筛选
  13. CCS+JS绘制星型拓扑图(关系图)
  14. 小程序 订阅消息 原来就是如此
  15. Cocos Creator 3.0 入门 ! 2D 素材 3D 效果!
  16. java中字段可以取名is开头吗
  17. TCP为什么连接建立需要三次握手,而不是两次握手?
  18. html5页面缓存设置
  19. 【数分书单】分析思维《一本小小的蓝色逻辑书》第一/二章小结
  20. R中用ggplot2画百分比柱状图

热门文章

  1. 在leangoo 里怎么设置工作量估算,添加附件,设置截止时间?
  2. 多级反馈队列调度算法原理
  3. html:text中readonly,HTML Input Text readOnly用法及代码示例
  4. PHP数组用处_PHP 数组函数妙用
  5. Linux系统函数之IO函数
  6. 使用多个MQTT调试工具mqtt.fx连接同个服务器地址报错,只能连接一个,修改Client ID即可
  7. 大疆车载招聘|SLAM、地图定位、感知算法、机器学习算法工程师
  8. YOLO-Fastest从Darknet源码编译、测试再到训练完整图文教程!
  9. 针孔相机模型之再学习
  10. vim php 语法高亮,linux vim配置文件(语法高亮)