Closed nE0sIghT closed 10 months ago
If you ran this code multiple times, then you see that is not the aioftp
client issue, but a server issue. All I can suggest here is just retries. On 5-10 attempts I get:
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:aioftp.client:220-Welcome to Yandex Mirror FTP service. Your served by: mirror01sas.mds.yandex.net
DEBUG:aioftp.client:220
DEBUG:aioftp.client:USER anonymous
DEBUG:aioftp.client:331 Please specify the password.
DEBUG:aioftp.client:PASS *****
DEBUG:aioftp.client:230 Login successful.
DEBUG:aioftp.client:CWD /debian
DEBUG:aioftp.client:250 Directory successfully changed.
DEBUG:aioftp.client:MLST dists/bookworm/InRelease
DEBUG:aioftp.client:500 Unknown command.
DEBUG:aioftp.client:TYPE I
DEBUG:aioftp.client:200 Switching to Binary mode.
DEBUG:aioftp.client:EPSV
DEBUG:aioftp.client:229 Entering Extended Passive Mode (|||55653|)
DEBUG:aioftp.client:MLSD dists/bookworm
DEBUG:aioftp.client:500 Unknown command.
DEBUG:aioftp.client:TYPE I
DEBUG:aioftp.client:200 Switching to Binary mode.
DEBUG:aioftp.client:EPSV
DEBUG:aioftp.client:229 Entering Extended Passive Mode (|||58750|)
DEBUG:aioftp.client:LIST dists/bookworm
DEBUG:aioftp.client:150 Here comes the directory listing.
DEBUG:aioftp.client:226 Directory send OK.
DEBUG:aioftp.client:QUIT
DEBUG:aioftp.client:221 Goodbye.
Traceback (most recent call last):
File "/home/poh/pro/aioftp/yoba-ya.py", line 35, in <module>
asyncio.run(main())
File "/home/poh/.pyenv/versions/3.11.2/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/home/poh/.pyenv/versions/3.11.2/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/poh/.pyenv/versions/3.11.2/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/poh/pro/aioftp/yoba-ya.py", line 20, in main
date = datetime.fromtimestamp(
^^^^^^^^^^^^^^^^^^^^^^^
ValueError: year 643056 is out of range
Thanks for quick reply!
I agree that it looks like server issue so it need to be further tested.
Hello!
I tried to use aioftp client and getting strange error
Here is sample code:
With that code I getting
Any advice about what I'm doing wrong?
Update: As per previously posted hang - I used setlocaly in wrong way