M
M
mafioznic1612019-08-14 11:32:54
Python
mafioznic161, 2019-08-14 11:32:54

How to download a file from ftp in python?

I took the code for a test, but the part that is responsible for downloading the file
writes:
with open(src, 'wb') as f:
PermissionError: [Errno 13] Permission denied: 'C:/Users/qubers/PycharmProjects'
Here is the code itself:

src = "C:/Users/qubers/PycharmProjects"
with open(src, 'wb') as f:
    ftp.retrbinary('RETR ' + 'offsets.cfg', f.write)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-08-14
@mafioznic161

what is written in the error?
How would it sound in Russian?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question