aio-libs / aio-libs/aioftp

[0.21.4] client.list returns Value Error because date format does not match on Windows

未關閉
#170 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
211
分支
63
PR 合併指標
30 天內沒有已合併 PR

描述

I get the following error:

```
ValueError: ('All parsers failed to parse', b'06-07-22 12:55PM 334976 opencv_frame_2.png\r\n', [KeyError('6-'), ValueError("time data '06-07-22 12:55PM' does not match format '%m/%d/%Y %I:%M %p'")])
```

I can replicate it with this simple test application.

```python
import asyncio
import aioftp
import os

async def test():
client = aioftp.Client()
await client.connect(host='127.0.0.1', port=21)
await client.login(user=os.environ['ftpusr'], password=os.environ['ftppass'])
l = await client.list('/')
print(l)

if __name__ == '__main__':
asyncio.run(test())
```

My suspicion is that it is because the parser expect a US date and not a european date?

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。