Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'modify': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:files': 0.09; "'rb')": 0.16; '24,': 0.16; 'dst)': 0.16; 'exist.': 0.16; 'folder,': 0.16; 'ioerror:': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:non': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'trying': 0.19; 'issue.': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'directory.': 0.24; 'exists': 0.24; 'file.': 0.24; 'source': 0.25; 'options': 0.25; 'script': 0.25; 'skip:" 30': 0.26; 'excel': 0.26; 'header:X-Complaints-To:1': 0.27; "doesn't": 0.30; 'code': 0.31; '50,': 0.31; 'file': 0.32; 'there.': 0.32; 'open': 0.33; 'running': 0.33; '(most': 0.33; 'add': 0.35; 'hi,': 0.36; 'to:addr :python-list': 0.38; 'files': 0.38; 'recent': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'according': 0.40; 'remove': 0.60; 'back': 0.62; 'such': 0.63; '*really*': 0.84; 'directory:': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Peter Otten <__peter__@web.de> Subject: Re: Copying non-existing files Date: Wed, 21 May 2014 12:15:24 +0200 Organization: None References: <8ff7483f-cec3-4cc8-bedf-68da09571350@googlegroups.com> <89887b39-3988-45cf-9a26-02f3eeef9f22@googlegroups.com> <934ba77e-6794-4d41-a3f3-ca0e370c4afb@googlegroups.com> <575e4180-b222-4e8f-a378-f39a51c3c085@googlegroups.com> <45b38d71-bf27-4d8e-b912-1093bbb38dcb@googlegroups.com> <2122e5a9-198d-4998-bebf-3f19fe110f57@googlegroups.com> <99a414b6-0d02-40ac-9891-e179ff296db8@googlegroups.com> <8389c3e9-1fa5-43a5-bee5-c64fe4ee0919@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: p57bd8888.dip0.t-ipconnect.de User-Agent: KNode/4.11.5 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1400667342 news.xs4all.nl 2838 [2001:888:2000:d::a6]:48228 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:71851 Satish ML wrote: [You're back to turd-formatted text; please find a permanent fix for this] > C:\Desktop\salingeg\dest\code > Traceback (most recent call last): > File > "C:\Users\salingeg\Desktop\excel_1.py", line 24, in > shut > il.copy(s, d) > File "C:\Program Files (x86)\python26\lib\shutil.py", > line 84, in copy > copyfile(src, dst) > File "C:\Program Files > (x86)\python26\lib\shutil.py", line 50, in > copyfile > with open (src, > 'rb') as fsrc: > IOError: [Errno 2] No such file or directory: > > u'C:\\Desktop\\salingeg\\src\\code\\a.c' According to the error message > the file you are trying to copy doesn't exist. Have a look into the > C:\Desktop\salngeg\src\code folder, and check whether a file called a.c > is there. If not you have three options - add the file - remove the line > from the excel file - modify the code to check if the *source* file > exists > > Hi, > > Source file exists in the directory. If you are *really* sure about this (please double-check) it may be a rights issue. Then make sure the user running the script has reading rights for the file.