ImportError (progress) when setting up for development

Asked by Aaron Whitehouse

Hello,

I'm wanting to try to help out with development (I'll be starting very small), but am struggling a little to get set up.

I am following the instructions in README-REPO:
==
REPO README - Notes for people checking out of Launchpad (bzr)
--------------------------------------------------------------

Getting duplicity to run:
-------------------------

By the numbers:
1) Do the checkout while in a location called $DUP_ROOT:
        bzr lp:duplicity . [for the dev branch]
   -OR- bzr lp:duplicity/stable . [for the stable branch]
2) cd $DUP_ROOT/duplicity
3) run "python compilec.py" to create _librsync.so
4) cd ..
5) run "./bin/duplicity -V". You will see "duplicity $version" instead
of the normal version number. Versioning comes during the release.

Everything seems to work fine until I get to step 5, when I receive an ImportError:
~/Programming/duplicity/trunk$ ./bin/duplicity -V
Traceback (most recent call last):
  File "./bin/duplicity", line 56, in <module>
    from duplicity import progress
ImportError: cannot import name progress

Sorry if this is a really obvious question.

Question information

Language:
English Edit question
Status:
Solved
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Solved by:
Kenneth Loafman
Solved:
Last query:
Last reply:
Revision history for this message
edso (ed.so) said :
#1

On 10.08.2014 16:37, Aaron Whitehouse wrote:
> New question #252898 on Duplicity:
> https://answers.launchpad.net/duplicity/+question/252898
>
> Hello,
>
> I'm wanting to try to help out with development (I'll be starting very small), but am struggling a little to get set up.
>
> I am following the instructions in README-REPO:
> ==
> REPO README - Notes for people checking out of Launchpad (bzr)
> --------------------------------------------------------------
>
> Getting duplicity to run:
> -------------------------
>
> By the numbers:
> 1) Do the checkout while in a location called $DUP_ROOT:
> bzr lp:duplicity . [for the dev branch]
> -OR- bzr lp:duplicity/stable . [for the stable branch]
> 2) cd $DUP_ROOT/duplicity
> 3) run "python compilec.py" to create _librsync.so
> 4) cd ..
> 5) run "./bin/duplicity -V". You will see "duplicity $version" instead
> of the normal version number. Versioning comes during the release.
>
> Everything seems to work fine until I get to step 5, when I receive an ImportError:
> ~/Programming/duplicity/trunk$ ./bin/duplicity -V
> Traceback (most recent call last):
> File "./bin/duplicity", line 56, in <module>
> from duplicity import progress
> ImportError: cannot import name progress
>
> Sorry if this is a really obvious question.
>

which branch did you check out? ..ede/duply.net

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#2

Thanks for your reply, Edgar.

I just checked out lp:duplicity and then went into trunk.

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#4

I'm still trying to get this to work.

Following the instructions at:
http://bazaar.launchpad.net/~duplicity-team/duplicity/0.7-series/view/head:/README-REPO
set out above.
==
1) Do the checkout while in a location called $DUP_ROOT:
        bzr lp:duplicity . [for the dev branch]
   -OR- bzr lp:duplicity/stable . [for the stable branch]
==
so I do:
:~/Programming$ bzr lp:duplicity .
bzr: ERROR: unknown command "lp:duplicity"

:~/Programming$ bzr branch lp:duplicity .
bzr: ERROR: Target directory "." already exists.

I therefore assume that this should be "bzr branch lp:duplicity":
:~/Programming$ bzr branch lp:duplicity
Branched 998 revisions.

==
2) cd $DUP_ROOT/duplicity
3) run "python compilec.py" to create _librsync.so
==
:~/Programming/duplicity/duplicity$ python compilec.py
running build
running build_ext
building '_librsync' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c _librsyncmodule.c -o build/temp.linux-x86_64-2.7/_librsyncmodule.o
creating build/lib.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/_librsyncmodule.o -lrsync -o build/lib.linux-x86_64-2.7/_librsync.so

==
4) cd ..
5) run "./bin/duplicity -V". You will see "duplicity $version" instead
of the normal version number. Versioning comes during the release.
==
:~/Programming/duplicity/duplicity$ cd ..
:~/Programming/duplicity$ ./bin/duplicity -V
Traceback (most recent call last):
  File "./bin/duplicity", line 56, in <module>
    from duplicity import progress
ImportError: cannot import name progress

Any thoughts would be appreciated.

Revision history for this message
Best Kenneth Loafman (kenneth-loafman) said :
#5

With the restructuring of the directories, the README-REPO needs some corrections.

Now that duplicity is in bin, PYTHONPATH=$DUP_ROOT is required for all commands like so:

$ PYTHONPATH=$DUP_ROOT bin/duplicity -V

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#6

Many thanks Kenneth, that answered my question.