gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] bootstrapping database problem with python path


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] bootstrapping database problem with python path
Date: Sat, 12 Jul 2008 14:02:03 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Jul 11, 2008 at 06:30:29PM +0200, Florian Hubold wrote:

> when using the gnumed server packages recently one user
> noticed a problem with the local database, as it is not available.
> When looking closer, it turns out it is a problem with bootstrapping,
> and more closer the python modules are not found in the python path.
>
> This is what happens during bootstrapping:
>
>    cd /usr/lib/GNUmed-server/server/bootstrap       export 
> PYTHONPATH=/usr/lib/GNUmed-server  <- same as extracted tarball

This is the directory which contains pycommon/ et cetera ?

BTW, the tarball unpacks to ./GNUmed-vX/... where X is the
version such as 8 or 9.

>    ./bootstrap-latest.sh
>
> This is the output from the script, only the relevant part:
>
>    2) bootstrapping databases
>    Please make sure the GNUmed Python modules are in the Python path !
>    Traceback (most recent call last):
>      File "./bootstrap_gm_db_system.py", line 42, in <module>
>        from Gnumed.pycommon import gmLog
>    ImportError: No module named Gnumed.pycommon

Note how the bootstrapper (bootstrap_gm_db_system.py) tries
to import modules from "Gnumed". A hazardous guess would be
that there is no such thing as /usr/lib/GNUmed-server/Gnumed pointing to
/usr/lib/Gnumed-server/server/ ?

The bootstrapper needs to find its modules in a directory
Gnumed - which we provide with a symlink.

You might want to download the tarball directly and verify
the /usr/lib/ structure is sane.

http://www.gnumed.de/downloads/server/

> I have already experimented a bit with PYTHONPATH, but to no avail.
> Actually when doing this directly within the extracted tarball, the  
> second step
> looks quite different, i guess this is because it finds a suitable config
> file where it looks for it:
>
>    2) bootstrapping databases
>
>    
> #################################################################################
>    #
>    # log file is
>    
> [/home/shadow/rpm/SOURCES/GNUmed-v8/server/bootstrap/bootstrap-latest-v2.log]
>    #
>    # Please email this file to <address@hidden> if you encounter
>    problems.
>    #
>    
> #################################################################################
>
>    =======================================
>    Bootstrapping GNUmed database system...
>    =======================================
>    Using config file
>    
> [/home/shadow/rpm/SOURCES/GNUmed-v8/server/bootstrap/bootstrap-local_first.conf].
>    You are about to install the following parts of GNUmed:
>    -------------------------------------------------------
>    -------------------------------------------------------
>    This script can be used to run SQL files local to a site
>    *before* bootstrapping the rest of the database.
>
>    Thereby things that are only needed locally can be
>    integrated with the bootstrapping process and need not
>    be run manually after re-bootstrapping.
>
>    It is "guaranteed" that this file will never be changed
>    by the GNUmed team, hence keeping local modifications
>    in a safe place.
>    Do you really want to install this database setup ?
>    Type yes or no: n
>    Bootstrapping aborted by user.

This looks much saner. It does find the modules and it also
does find the data files needed for bootstrapping.

> So my question is how to bootstrap the database in my situation?
Can you describe your situation a bit more in detail.
Exactly how do you want bootstrapping to occur ?

The bootstrapping scripts weren't really developed to be
callable from anywhere in the system. Given the right set of
conditions this will work nonetheless. Just tell exactly how
you want this to work.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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