[Top][All Lists]

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

Re: [Gnumed-devel] again, trouble applying a bootstrap upgrade (from cvs

From: Karsten Hilbert
Subject: Re: [Gnumed-devel] again, trouble applying a bootstrap upgrade (from cvs)
Date: Wed, 30 Dec 2009 21:40:28 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Dec 30, 2009 at 11:47:27AM -0800, Jim Busser wrote:

> ok... I have re-downloaded cvs and I have had the
> following problem before, but never became fully clear as to
> its resolution. It is the problem of
>       ImportError: No module named Gnumed.pycommon

There is no single-thing-and-done resolution for this issue.
The problem must be understood and eventually re-solved in
possibly each case. However, the solution will often be the

Python needs to find the files it is supposed to import. It
looks at various directories to find them including all of
the directories in PYTHONPATH and the current directory.

The, in particular, tells Python
to also look two levels above where it is installed. In that
place it expects a directory "Gnumed" within which there is and the subdirectory "pycommon".

If those conditions hold the

        from Gnumed.pycommon import ...

will succeed.

> In doing a file search on my Debian file system, filename matches on 
> "pycommon" exist under
>       .../client/

That is a local installation of the files needed for bootstrapping.

> and under
>       /var/lib/gnumed/server/pycommon

That is a systemwide installation of the files needed for bootstrapping.

> however if I try instead running from within
> the above directory,

Which ?

> the script cannot see the conf files

Which ?

> in the bootstrap directory.

Which ?

> Following was my terminal output. (I had first tried with sudo, but even as 
> su root the following failed)"
> *************************************
> debian:/home/jbusser/gmcvs/gnumed/gnumed/server/bootstrap# sh 
> 11 12
> ===========================================================
> Upgrading GNUmed database.
> This will *non-destructively* create a new GNUmed database
> of version v12 from an existing v11 database.
> Existing data is transferred and transformed as necessary.
> This script usually needs to be run as <root>. Also,
> the database "gnumed_v11" must not be used by
> other users.
> The name of the new database will be "gnumed_v12".
> ===========================================================
> 1) creating backup of existing database ...
> Note that this may take a substantial amount of time and disk space!
> You may need to type in the password for gm-dbo.
> Password: 
> 2) upgrading to new database ...
> Adjusting PYTHONPATH ...
> Please make sure the GNUmed Python modules are in the Python path !
> Traceback (most recent call last):
>  File "./", line 67, in <module>
>    from Gnumed.pycommon import gmLog2
> ImportError: No module named Gnumed.pycommon
> Upgrading "gnumed_v11" to "gnumed_v12" did not finish successfully.
> debian:/home/jbusser/gmcvs/gnumed/gnumed/server/bootstrap#

If you look at


do you see a directory (a link, actually) pointing to


under which there eventually is a "pycommon/" ?

Does that 


contain an "" ?

Try running as "./ ..." rather than "sh" just to see whether it makes a difference.

Eventually, you will most certainly need to run like so:

        sudo ./ 11 12

to make it fully succeed regarding access rights.

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

reply via email to

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