module missing when building client

Bug #910207 reported by rasos
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
u1sync
Expired
Undecided
Unassigned

Bug Description

I need to sync folders on a headless groupware server.
Luckily I found some instructions here, how to install u1sync and how to generate the oauth token:
http://per.liedman.net/2011/12/28/using-ubuntu-one-from-a-headless-oneiric-ocelot

So I run
u1sync --oauth=xxxx:yyyyy /home/groupoffice/users/ras/testordner

Unfortunately, I get the following error message.

File “/usr/local/bin/u1sync”, line 28, in
from u1sync.main import main
File “/usr/local/lib/python2.6/dist-packages/u1sync/main.py”, line 39, in
import ubuntuone.storageprotocol.dircontent_pb2 as dircontent_pb2
ImportError: No module named ubuntuone.storageprotocol.dircontent_pb2

Any idea where to obtain ubuntuone.storageprotocol.dircontent_pb from?

-rasos

Revision history for this message
SB (stefan-bommer) wrote :

same here with python2.7 on an oneiric headless server...

Revision history for this message
Rick McBride (rmcbride) wrote :

python-ubuntuone-storageprotocol is the package you'll need to satisfy that import.

Revision history for this message
SB (stefan-bommer) wrote :

thanks a bunch for the tip. now i get this new error :)

Traceback (most recent call last):
  File "/usr/local/bin/u1sync", line 28, in <module>
    from u1sync.main import main
  File "/usr/local/lib/python2.7/dist-packages/u1sync/main.py", line 43, in <module>
    from u1sync.client import (
  File "/usr/local/lib/python2.7/dist-packages/u1sync/client.py", line 35, in <module>
    from ubuntuone.platform.xdg_base_directory import ubuntuone_log_dir
ImportError: No module named platform.xdg_base_directory

can you just make a list of all necessary dependencies so i can install them in one go?

Revision history for this message
Rick McBride (rmcbride) wrote :

apt-get build-dep ubuntuone-client

should get you a list. Obviously that's the full client, but the build dependencies should be pretty close. Since I didn't specify the gnome client on that line, it shouldn't pull in anything that would cause issue on a headless system.

Rodney, can you confirm? I don't want to recommend he install MORE than he needs.

Changed in u1sync:
assignee: nobody → Rodney Dawes (dobey)
status: New → Incomplete
Revision history for this message
dobey (dobey) wrote :

I would generally recommend against using u1sync as it isn't well maintained, and it's very easy to screw things up with it.

As far as the ubuntuone.platform.xdg_base_directory requirement, that should be provided by ubuntuone-client itself.

Revision history for this message
CF (jnm) wrote :

Have installed all 90Mb of dependencies from ubuntuone-client. Including all sorts of GTK stuff, audio files, dbus nonsense.

Am still getting the ImportError: No module named platform.xdg_base_directory.

Have checked, and the package python-xdg is installed and up to date.

The u1sdtool doesn't seem to be much help either. I just get a bunch of GTK errors, obviously, because I'm not running an X server.

Is there actually any way to get a headless server to use UbuntuOne? As in an Ubuntu Sanctioned way?

Is there a way to mount Ubuntu One as a drive perhaps, using WebDAV, or fuse or something like that?

Revision history for this message
ScaryTom (t-denley) wrote :

Rodney, you say:
> I would generally recommend against using u1sync as it isn't well maintained

So, what would you recommend for a headless CLI for ubuntu one? Like CF, I'm using ubuntu server (precise) and I want to cron an ubuntu one batch job to sync overnight when bandwidth is cheap.

Revision history for this message
ScaryTom (t-denley) wrote :

@CF: I've managed to get past the platform.xdg_base_directory ImportError by installing the python-ubuntuone-client package.

Unfortunately I'm now getting ImportError: No module named ubuntu_sso.xdg_base_directory.

Revision history for this message
ScaryTom (t-denley) wrote :

Really hope I don't have to install the python-ubuntu-sso-client package, as it has a gazillion deps, including GTK stuff... madness.

Revision history for this message
ScaryTom (t-denley) wrote :

well, I bit the bullet and installed python-ubuntu-sso-client package, and now I have a working u1sync -- hooray!

To summarise, from a clean install of precise, these are the packages you need:
    python-gobject
    python-ubuntuone-storageprotocol
    python-ubuntuone-client
    python-ubuntu-sso-client

To obtain and setup u1sync, you'll also need bzr:
    sudo apt-get install bzr
    bzr branch lp:u1sync
    sudo python u1sync/setup.py install

I'm still very interested in hearing Rodney's recommended alternative to u1sync (which he recommends against). We are crying out for a decent, supported, completely headless CLI for ubuntu one.

Revision history for this message
rasos (rasos) wrote :

Ubuntu WIKI is now having a tutoria for headless syncl: https://wiki.ubuntu.com/UbuntuOne/Headless
Still, you need to install full client with all GDK depencies. This is not an option for a virtualized hosting server running a groupware.

Revision history for this message
dobey (dobey) wrote : Re: [Bug 910207] Re: module missing when building client

On Tue, 2012-08-28 at 18:39 +0000, rasos wrote:
> Still, you need to install full client with all GDK depencies. This is
> not an option for a virtualized hosting server running a groupware.
>
You say *install* of these packages is not an option. Can you explain
why? Just because they are installed, does not mean you are running a
full GNOME environment on the server.

dobey (dobey)
Changed in u1sync:
assignee: Rodney Dawes (dobey) → nobody
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.