I ran the director in a shell and this was the output I received. bacula-dir: dird.c:128 Debug level = 1 Traceback (most recent call last): File "/etc/bacula/scripts/DirStartUp.py", line 6, in ? import time, sys, bacula ImportError: /usr/lib/python2.3/lib-dynload/timemodule.so: undefined symbol: PyInt_FromLong bkup1-roc-dir: pythonlib.c:134 Python Import error.
It looks to be due to the fact I want to import the time module into the script. Is there any reason why I shouldn't be able to use external modules?? David Wilson Network Security Engineer PAETEC Communications, Inc. -----Original Message----- From: Kern Sibbald [mailto:[EMAIL PROTECTED] Sent: Monday, June 12, 2006 9:54 AM To: Wilson, David Cc: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] Python Question On Monday 12 June 2006 14:15, Wilson, David wrote: > I just finished reading through the dev manual and I checked to make > sure that the following is true: > > 1. The director can write to the directory, and is creating a > DirStartUp.pyc file. > 2. Any functions I do not want have been removed, or the noop=1 has been > placed within the event. > > Is there any way to get more detail other than the error messages I am > seeing? Seeing I cannot run the file from the command line to see if it > is syntax problem, it would be nice to find out why bacula cannot use > the file. Manually run the Director with the -d1 option on the command line in a shell window, and if you are lucky, the Python error message associated with the problem will be printed in the shell. Otherwise, start with the example files unchanged and make sure that the script file has totally open permissions. That should get it working, afterwards you can make changes a bit at a time until you get what you want. > > Thanks, > > David Wilson > Network Security Engineer > PAETEC Communications, Inc. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Kern > Sibbald > Sent: Saturday, June 10, 2006 11:16 AM > To: bacula-users@lists.sourceforge.net > Cc: Wilson, David > Subject: Re: [Bacula-users] Python Question > > On Friday 09 June 2006 21:21, Wilson, David wrote: > > Greetings, > > > > > > > > I am working with using the python functionality of bacula and I am > > running into a problem with the DirStartUp.py script. > > > > > > > > Whenever I startup bacula, or restart the python engine I receive the > > following error: > > > > > > > > 09-Jun 15:14 bkup1-roc-dir: ERROR in pythonlib.c:131 Could not import > > Python script /etc/bacula/scripts/DirStartUp. Python disabled. > > > > > > > > When I attempt to run the script manually I receive: > > > > Traceback (most recent call last): > > > > File "DirStartUp.py", line 6, in ? > > > > import sys, bacula, time > > > > ImportError: No module named bacula > > > > > > > > I did compile bacula with -with-python and I received no errors while > > installing in. > > > > > > > > Any ideas?? > > Please see the Python chapter of the development manual -- in particular > the > Python Configuration section. I have added several paragraphs that > explain > this problem. > > http://www.bacula.org/dev-manual/Python_Scripting.html > > > David Wilson > > Network Security Engineer > > PAETEC Communications, Inc. -- Best regards, Kern ("> /\ V_V _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users