Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7635203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:22:48+00:00 2026-05-31T07:22:48+00:00

def move_file(dirs,src,dst): src = src+.jpg dst = item[1]+/+src print src # Moves the file

  • 0
def move_file(dirs,src,dst):

    src = src+".jpg"
    dst = item[1]+"/"+src

    print src
    # Moves the file        
    shutil.copyfile(src, dst)

move_file(dirs,item[0],item[1])

gives me this error:

IOError: [Errno 2] No such file or directory: 'r/001.jpg'

Even when

item = ('001','Grass')

Where is the ‘r/’ coming from?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:22:49+00:00Added an answer on May 31, 2026 at 7:22 am

    Your codes a bit messed up so its not entirely clear, but it looks like you are passing item[1] (== ‘Grass’) to move_files as dst. You are also using item[1] inside move_files, which might be a typo, but if not then what is the value of item at that point? Or should it be dst? Either way, it looks like item == 'Grass' at the point that you’re doing dst = item[1]+"/"+src, and so item[1] == 'r'.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The python implementation import sys def move(src, dst, tmp, num): if num == 1:
def foo(**args): for k, v in args.items(): print type(k), type(v) for k, v in
I've gotten used to writing functions that work like this: def f(): if sunny:
I am trying to move a file from server \\abc\\C$\\temp\\coll.zip to another server \\def\\c$\\temp
I have a directory structure like this: root folder1 abc.json def.json somedir more.json folder2
Still writing a game. This error's a little different, though. I get a trace
Here's my old code to sends a file to the browser: def show send_file
I've currently got this in my view file: <%= <em>(#{package.to_company})</em> unless package.to_company.blank? %> Is
def foo (): x = re.compile('^abc') foo2(x) def foo2(x): How do I get x
def update @album = Album.find(params[:id]) if @album.update_attributes(params[:album]) redirect_to(:action=>'list') else render(:action=>'edit') end end A Rails

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.