Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
fs.utils.movedir error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jonathan  
View profile  
 More options Jan 11 2012, 4:45 am
From: Jonathan <jonathan.harring...@gmail.com>
Date: Wed, 11 Jan 2012 01:45:43 -0800 (PST)
Local: Wed, Jan 11 2012 4:45 am
Subject: fs.utils.movedir error
Hi,

I was hoping someone could tell me what I am doing wrong. I am running
a SVN checkout from this morning and all the pyfilesystem unit tests
pass on my system. I am using Python 2.7.2 and I have tried it on
Ubunutu 11.10 & OS X Lion.

I have the following code:

from fs.memoryfs import
MemoryFS
from fs import utils as
fs_utils
a =
MemoryFS()
b =
MemoryFS()
a.makedir("/
foo")
a.createfile("/foo/
bar.txt")
a.setcontents("/foo/bar.txt",
"hello")
print a.getcontents("/foo/
bar.txt")
fs_utils.movedir(a, b)

and when I run it I get the following output:

hello
Traceback (most recent call last):
  File "main.py", line 9, in <module>
    fs_utils.movedir(a, b)
  File "/home/jonathan/.virtualenvs/fstests/local/lib/python2.7/site-
packages/fs-0.4.1-py2.7.egg/fs/utils.py", line 214, in movedir
    chunk_size=chunk_size)
  File "/home/jonathan/.virtualenvs/fstests/local/lib/python2.7/site-
packages/fs-0.4.1-py2.7.egg/fs/base.py", line 143, in acquire_lock
    return func(self, *args, **kwargs)
  File "/home/jonathan/.virtualenvs/fstests/local/lib/python2.7/site-
packages/fs-0.4.1-py2.7.egg/fs/mountfs.py", line 374, in movedir
    super(MountFS,self).movedir(src,dst,**kwds)
  File "/home/jonathan/.virtualenvs/fstests/local/lib/python2.7/site-
packages/fs-0.4.1-py2.7.egg/fs/base.py", line 1177, in movedir
    raise DestinationExistsError(dst)
fs.errors.DestinationExistsError: Destination exists: dst

Jonathan.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Will McGugan  
View profile  
 More options Jan 11 2012, 4:48 am
From: Will McGugan <willmcgu...@gmail.com>
Date: Wed, 11 Jan 2012 09:48:25 +0000
Local: Wed, Jan 11 2012 4:48 am
Subject: Re: fs.utils.movedir error

Yeah, spotted that one recently. Will fix soon. In the meantime, I think it
will work if you add 'overwrite=True'.

Will

On Wed, Jan 11, 2012 at 9:45 AM, Jonathan <jonathan.harring...@gmail.com>wrote:

--
Will McGugan
http://www.willmcgugan.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan  
View profile   Translate to Translated (View Original)
 More options Jan 11 2012, 4:58 am
From: Jonathan <jonathan.harring...@gmail.com>
Date: Wed, 11 Jan 2012 01:58:25 -0800 (PST)
Local: Wed, Jan 11 2012 4:58 am
Subject: Re: fs.utils.movedir error
Hi, Will.

Thanks for the quick response. Adding overwrite=True caused it to
raise a KeyError but when I changed it to use copydir instead (which
is what I really wanted when I thought about it) it worked fine.

Jonathan.

On Jan 11, 9:48 am, Will McGugan <willmcgu...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Will McGugan  
View profile  
 More options Jan 11 2012, 6:22 pm
From: Will McGugan <willmcgu...@gmail.com>
Date: Wed, 11 Jan 2012 23:22:46 +0000
Local: Wed, Jan 11 2012 6:22 pm
Subject: Re: fs.utils.movedir error

There's a fix for that in trunk now. And some tests for movedir/copydir!

On Wed, Jan 11, 2012 at 9:58 AM, Jonathan <jonathan.harring...@gmail.com>wrote:

--
Will McGugan
http://www.willmcgugan.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »