有关在Windows中阅读日语文件名的问题
我有一个带有日语文件名的文件,需要读取
202112_10エリア計.csv
它在Windows PC上正常工作,我只需要阅读它:
pd.read_csv (file_path+'202112_10エリア計.csv')
但是,当我尝试在github Action上使用它时(仍然是Windows EnviroMent) 它有错误:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\202112_10\u30a8\u30ea\u30a2\u8a08.csv'
所以,我认为这是因为github动作无法阅读日语角色 我想在阅读它之前对其进行编码
csv_name = csv_name.decode('utf-8')
,然后再次出现错误,
AttributeError: 'str' object has no attribute 'decode'
所以我想知道是否有人可以帮助我实现这一目标?提前致谢:)
I have a file with japanese file name need to be read
202112_10エリア計.csv
it works fine on my windows pc, i just need to read it by:
pd.read_csv (file_path+'202112_10エリア計.csv')
however, when i was trying to use it on Github Action(still windows enviroment)
it got error:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\202112_10\u30a8\u30ea\u30a2\u8a08.csv'
so, i think its because github action can not read japanese character
and i want to encoding it before read it
csv_name = csv_name.decode('utf-8')
and it got error again
AttributeError: 'str' object has no attribute 'decode'
so i was wondering if someone could help me achieve this? thanks in advance:)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论