duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] local_path.exists() fails when testing a new backen


From: address@hidden
Subject: Re: [Duplicity-talk] local_path.exists() fails when testing a new backend
Date: Thu, 10 Jul 2014 15:26:33 +0100

Hi Kenneth,

when you says "what backend did you base it on" you are talking about
the backend client? In this case you want to know what Skylable is or
something else?
About ipython: it's only invoked when I use ipdb to debug my code
step-by-step, but the code doesn't work even when I don't execute it
step-by-step, so I don't think ipython can be the problem...

Please let me know, cheers.


On 10 July 2014 14:54, Kenneth Loafman <address@hidden> wrote:
> Your code looks amazingly like all the others and I can't see a problem.
> What backend did you base it on?  I'm wondering if there may have been a
> problem already reported on that backend.
>
> We don't officially support ipython.  Could you try it again using plain old
> python?
>
> ...Ken
>
>
> On Wed, Jul 9, 2014 at 5:33 PM, address@hidden <address@hidden>
> wrote:
>>
>> Hi guys,
>>
>> sorry if I ask again, but has anyone an idea why that backend call is
>> failing?
>> I would really appreciate your help. We are really close to complete
>> the backend for Skylable client and this would be an additional
>> opportunity also for Duplicity.
>>
>> Thank you so much for your help.
>>
>> Cheers.
>>
>>
>> On 3 July 2014 21:32, address@hidden <address@hidden> wrote:
>> > Hi guys,
>> >
>> > as you probably know I'm working on the Duplicity backend for Skylable
>> > service. I'm basing my work on your "devel" branch (0.7.x) and you can
>> > find my work in progress here:
>> > https://github.com/andreagrandi/duplicity-sx
>> >
>> > Now, let's go to the issue. It looks like I've problems implementing
>> > the _get method of my backend.
>> >
>> > On high level, this is the error I get when I execute a command like
>> > this:
>> >
>> > PYTHONPATH=. ./bin/duplicity -v9 sx://indian.skylable.com/vol-andy80/
>> > ./test-bkp
>> >
>> > output here: http://pastebin.com/JF4LuWXZ
>> >
>> > Debugging my code with ipdb I can see this:
>> >
>> >>
>> >> /home/andrea/Downloads/duplicity/duplicity/backends/sxbackend.py(39)_get()
>> >      38         commandline = "sxcp {0} {1}".format(remote_path,
>> > local_path.name)
>> > ---> 39         self.subprocess_popen(commandline)
>> >      40
>> >
>> > ipdb> n
>> >> /home/andrea/Downloads/duplicity/duplicity/backend.py(541)get()
>> >     540             self.backend._get(remote_filename, local_path)
>> > --> 541             if not local_path.exists():
>> >     542                 raise BackendException(_("File %s not found
>> > locally after get "
>> >
>> > ipdb> local_path.exists()
>> > ipdb> local_path
>> > (() /tmp/duplicity-V8v6rE-tempdir/mktemp-0tsmWi-2 None)
>> >
>> > as you can see the .exists() method doesn't return anything, while
>> > inspecting the object it contains a file that I've verified being
>> > existing (the only two things that I don't understand are: is that
>> > empty tumple at the beginning ok? It's the None at the end ok?):
>> >
>> > andrea-Inspiron-660:duplicity andrea [master] $ ls -al
>> > /tmp/duplicity-V8v6rE-tempdir/mktemp-0tsmWi-2
>> > -rw-rw-r-- 1 andrea andrea 4455795 lug  3 21:20
>> > /tmp/duplicity-V8v6rE-tempdir/mktemp-0tsmWi-2
>> >
>> > The code of course fails because tha exists() fails:
>> >
>> >> /home/andrea/Downloads/duplicity/duplicity/backend.py(542)get()
>> >     541             if not local_path.exists():
>> > --> 542                 raise BackendException(_("File %s not found
>> > locally after get "
>> >     543                                          "from backend") %
>> > util.ufn(local_path.name))
>> >
>> > Now my question is: why the .exists() fails if the path exists? What's
>> > wrong with my code?
>> >
>> > Thank you so much. Cheers.
>> >
>> > --
>> > Andrea Grandi -  Software Engineer / Qt Ambassador / Nokia Developer
>> > Champion
>> > website: http://www.andreagrandi.it
>>
>>
>>
>> --
>> Andrea Grandi -  Software Engineer / Qt Ambassador / Nokia Developer
>> Champion
>> website: http://www.andreagrandi.it
>>
>> _______________________________________________
>> Duplicity-talk mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/duplicity-talk
>
>
>
> _______________________________________________
> Duplicity-talk mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/duplicity-talk
>



-- 
Andrea Grandi -  Software Engineer / Qt Ambassador / Nokia Developer Champion
website: http://www.andreagrandi.it



reply via email to

[Prev in Thread] Current Thread [Next in Thread]