记录一个奇怪的Python错误
2022/7/27 1:23:50
本文主要是介绍记录一个奇怪的Python错误,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
报错如下:
Traceback (most recent call last):
File "F:/D/code/excel/csv_excel.py", line 4, in <module>
import pandas as pd
File "D:\software\anaconda\envs\TQ\lib\site-packages\pandas\__init__.py", line 11, in <module>
__import__(dependency)
File "D:\software\anaconda\envs\TQ\lib\site-packages\numpy\__init__.py", line 144, in <module>
from . import core
File "D:\software\anaconda\envs\TQ\lib\site-packages\numpy\core\__init__.py", line 100, in <module>
from . import _add_newdocs_scalars
File "D:\software\anaconda\envs\TQ\lib\site-packages\numpy\core\_add_newdocs_scalars.py", line 87, in <module>
add_newdoc_for_scalar_type('byte', [],
File "D:\software\anaconda\envs\TQ\lib\site-packages\numpy\core\_add_newdocs_scalars.py", line 62, in add_newdoc_for_scalar_type
alias_doc += ''.join(":Alias on this platform ({} {}): `numpy.{}`: {}.\n ".format(platform.system(), platform.machine(), alias, doc)
File "D:\software\anaconda\envs\TQ\lib\site-packages\numpy\core\_add_newdocs_scalars.py", line 62, in <genexpr>
alias_doc += ''.join(":Alias on this platform ({} {}): `numpy.{}`: {}.\n ".format(platform.system(), platform.machine(), alias, doc)
File "D:\software\anaconda\envs\TQ\lib\platform.py", line 897, in system
return uname().system
File "D:\software\anaconda\envs\TQ\lib\platform.py", line 785, in uname
node = _node()
File "D:\software\anaconda\envs\TQ\lib\platform.py", line 588, in _node
import socket
File "D:\software\anaconda\envs\TQ\lib\socket.py", line 52, in <module>
import os, sys, io, selectors
File "D:\software\anaconda\envs\TQ\lib\selectors.py", line 12, in <module>
import select
File "F:\D\code\excel\select.py", line 6, in <module>
dirs = os.listdir(path)
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: 'H:\\TQQ\\rain\\csv\\txt\\2018'
一开始以为是环境的问题,后面以为是编译器的问题,仔细排查之后发现项目中有一个名为select.py的文件,这个文件可能与os库中的文件命名有冲突,故将其改名后代码即可正常运行。
这篇关于记录一个奇怪的Python错误的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-12-24Python编程入门指南
- 2024-12-24Python编程基础入门
- 2024-12-24Python编程基础:变量与数据类型
- 2024-12-23使用python部署一个usdt合约,部署自己的usdt稳定币
- 2024-12-20Python编程入门指南
- 2024-12-20Python编程基础与进阶
- 2024-12-19Python基础编程教程
- 2024-12-19python 文件的后缀名是什么 怎么运行一个python文件?-icode9专业技术文章分享
- 2024-12-19使用python 把docx转为pdf文件有哪些方法?-icode9专业技术文章分享
- 2024-12-19python怎么更换换pip的源镜像?-icode9专业技术文章分享