Unable to update to ST 2009

Asked by Laurie Savage on 2009-05-04

I have tried to update from ST 2008 to ST 2009 by doing the following:
     apt-get remove ST 2008
     copy data file
     apt-get install ST 2009

After the usual messages from apt-get I recieve the following error message:

Setting up schooltool-2009 (1) ...
update-rc.d: warning: /etc/init.d/schooltool-2009 missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
 * Starting SchoolTool 2009... Traceback (most recent call last):
  File "/usr/bin/paster", line 17, in <module>
    from paste.script import command
ImportError: No module named paste.script

I can't load the site and I'm not really sure how to deal with this. I have some critical data in the database.

Laurie Savage
Pascoe Vale Girls College
Pascoe Vale, Victoria, Australia

Question information

Language:
English Edit question
Status:
Answered
For:
SchoolTool Edit question
Assignee:
No assignee Edit question
Last query:
2009-05-11
Last reply:
2009-08-26
Tom Hoffman (tom-hoffman) said : #1

Did this go away?

Laurie Savage (sav-pvgc) said : #2

Hi Tom,

Unfortunately my problem did not go away. The gradebook questions refer to
ST 2008 running on our school's server on top of Jaunty. The paste script
issue relates to a local laptop installation, again running on Jaunty. The
upgrade to Jaunty clobbered Schooltool on both machines. I'm surprized
because you seem to be running under the Ubuntu impramatur.

Laurie

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Tom
Hoffman
Sent: Tuesday, 5 May 2009 1:01 AM
To: <email address hidden>
Subject: [Question #69880]: Status of bug #371630 changed to 'Incomplete'
inSchoolTool

Bug #371630 status changed in SchoolTool:

    New => Incomplete

Status change explanation given by Tom Hoffman:

Judging by Laurie's subsequent questions, I think this went away. One
person ran into this and couldn't get rid of it, but he messed around with
the configuration of his system so much that debugging it further was
impossible.

https://bugs.edge.launchpad.net/schooltool/+bug/371630
"ImportError: No module named paste.script"

This bug is linked to #69880.
Unable to update to ST 2009
https://answers.edge.launchpad.net/schooltool/+question/69880

--
You received this question notification because you are a direct subscriber
of the question.

Tom Hoffman (tom-hoffman) said : #3

Hi Laurie,

The paste error has come up a couple times, but we haven't been able to reproduce it consistently -- and as I mentioned it has gone away immediately when I've seen it. How did you get over the clobbering on the other machine? Did you get the same error?

Laurie Savage (sav-pvgc) said : #4

When I restarted my Jaunty machines I had no more access to Schooltool so I reinstalled it on both. On the server this was problem free, on the laptop it was a disaster. I'm not sure what has happened and why. On the server I briefly had a mixed installation and the paste error because I had the wrong repositories enabled (8.10 instead of 9.04) but I fixed these, did an aptitude "purge" of ST 2008 and 2009, then reinstalled according to your site's directions. Having learnt from that, I followed your directions to the letter on the laptop, with resulting paste issues. I checked that python-paste was installed - it was.

Steps I've taken include doing an "aptitude purge schooltool-2008/2009", aptitude reinstall ST 09, aptitude purge again followed by aptitude clean and then aptitude install in case the cached deb file was corrupted in some fashion.

Laurie

Laurie Savage (sav-pvgc) said : #5

The problem went away with the latest Jaunty automatic update. Thanks for the kind help.

Fredrik Sandebert (sandebert) said : #6

Hi,

I have a fully patched Jaunty this is fairly vanilla - no crazy drivers or mods. Today I tried to install SchoolTool on it using the Terminal, using the official instructions. At the end of the installation I got the error below.

(I should probably mention that neither Zope nor SchoolTool has been installed on this computer, so there should be no residue from earlier installations.)

<snip>

Setting up python-schooltool.stapp2008fall (0.2.4-1) ...

Setting up schooltool-2009 (1) ...
update-rc.d: warning: /etc/init.d/schooltool-2009 missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
 * Starting SchoolTool 2009...
Traceback (most recent call last):
  File "/usr/bin/paster", line 17, in <module>
    from paste.script import command
ImportError: No module named paste.script
   ...fail!
   ...done.

Processing triggers for python-support ...
hello@there:/etc/apt$

Reading the previous posts I understand it's probably better if I don't try to solve this. Instead I will let it be, and wait for questions from the SchoolTool developers so I hopefully can report relevant data back. I'd like to help solve it, so please just ask away and I'll report back.

Thanks,
Fredrik

Tom Hoffman (tom-hoffman) said : #7

Hi Fredrik,

Try starting schooltool manually: sudo /etc/init.d/schooltool-2009 start

That usually works for me when this error comes up in installation.

--Tom

Fredrik Sandebert (sandebert) said : #8

Hi Tom,

It worked like a charm - thanks!

Should I just ignore the message I described above and carry on my testing, or do you think somebody in the ST team will want me to test or look up something to make it go away so it won't happen for other people?

/Fredrik

Tom Hoffman (tom-hoffman) said : #9

I'll update the bug linked to this question.

Thanks!

This particular error message should have been fixed on May 14. But I know other errors may happen during upgrade or install. After that starting the server manually should work fine.

I am working on the fix to start the server at the right time.

Catanius (v-brustmeier) said : #11

Hello everbody,
that problem ocurred while starting the server manually!

root@volker-desktop:/home/volker# exit
exit
volker@volker-desktop:~$ sudo /etc/init.d/schooltool-2009 start
 * Starting SchoolTool 2009... Traceback (most recent call last):
  File "/usr/bin/paster", line 17, in <module>
    from paste.script import command
ImportError: No module named paste.script
                                                                         [fail]
                                                                         [ OK ]
volker@volker-desktop:~$

So, what to do?

Tom Hoffman (tom-hoffman) said : #12

First, make sure you're updated to the latest version (sudo apt-get update && sudo apt-get upgrade).

Catanius (v-brustmeier) said : #13

sudo apt-get update && sudo apt-get upgrade

This is what I'm doing first, before I ask a question.
Sorry, but the problem is still the same.

What version of python-paste is installed?
Should be 1.7.1-1ubuntu2 , that one is fixed, available from
https://launchpad.net/~schooltool-owners/+archive/ppa/+files/python-paste_1.7.1-1ubuntu2_all.deb

Almost all python packages we use are architecture-independent, so should be no different problem with 64bit.
I don't have where to test an 64bit release.

Catanius (v-brustmeier) said : #15

Hello again,

ok the paster is the version mentioned above. Update and upgrade are newest.
The problem is still the same. Python paster is not working.

volker@volker-desktop:~$ sudo /etc/init.d/schooltool-2009 start
[sudo] password for volker:
 * Starting SchoolTool 2009... Traceback (most recent call last):
  File "/usr/bin/paster", line 17, in <module>
    from paste.script import command
ImportError: No module named paste.script
                                                                         [fail]
                                                                         [ OK ]
volker@volker-desktop:~$

I see this on jaunty 64bit on apt-get install,
but running `/etc/init.d/schooltool-2009 start` successfully starts the server

The problem was that when python-pastescript is installed as a dependency of schooltool, is still not ready to use when schooltool server was started. I made schooltool-common Pre-Depend on python-pastescript, and now the problem should not occur on new installs.

However I'm puzzled why paste.script would not be found on manual start, and cannot reproduce that (on jaunty 32- and 64-bit)

Catanius (v-brustmeier) said : #18

I upgraded already schooltool-common and reinstalled the whole package.
Python I reinstalled too with much trouble on some apps, but schooltool is
the first on my list to run. Now python 2.4, 2.5, 2.6 and 3 is on my system.
zope and the bl.... paster too.
The problem is still the same! So I'm helpless.
But thank you for spending time on that problem. (jaunty 64-bit)
I did the same way on my 32-bit netbook and there's no problem....
But I need this app on my "big" machine.

volker@volker-desktop:~$ sudo /etc/init.d/schooltool-2009 start
[sudo] password for volker:
 * Starting SchoolTool 2009... Traceback (most recent call last):
  File "/usr/bin/paster", line 17, in <module>
    from paste.script import command
ImportError: No module named paste.script
                                                                         [fail]
                                                                         [ OK ]
volker@volker-desktop:~$

Tom Hoffman (tom-hoffman) said : #19

Do we need to file a paste bug?

Catanius (v-brustmeier) said : #20

Maybe a good idea... or you know the author of the python paster and you'll
forward the problem to him?

Ignas Mikalaj┼źnas (ignas) said : #21

Can you try running:

/usr/bin/paster
python2.4 /usr/bin/paster
python2.5 /usr/bin/paster
python2.6 /usr/bin/paster

also looking which of the

/usr/bin/paster2.4
/usr/bin/paster2.5
/usr/bin/paster2.6

are available on your system

and maybe even posting the output of

apt-cache policy python-paste python-pastescript

Ignas

Catanius (v-brustmeier) said : #22

OK, here are the posts:

/usr/bin/paster

Usage: /usr/bin/paster COMMAND
Usage: paster [paster_options] COMMAND [command_options]

Options:
  --version show program's version number and exit
  --plugin=PLUGINS Add a plugin to the list of commands (plugins are Egg
                    specs; will also require() the Egg)
  -h, --help Show this help message

Commands:
  create Create the file layout for a Python distribution
  help Display help
  make-config Install a package and create a fresh config file/directory
  points Show information about entry points
  post Run a request for the described application
  request Run a request for the described application
  serve Serve the described application
  setup-app Setup an application, given a config file

Catanius (v-brustmeier) said : #23

python2.4 /usr/bin/paster

Traceback (most recent call last):
  File "/usr/bin/paster", line 17, in ?
    from paste.script import command
ImportError: No module named paste.script
root@volker-desktop:/home/volker#

python2.5 /usr/bin/paster

Traceback (most recent call last):
  File "/usr/bin/paster", line 17, in <module>
    from paste.script import command
ImportError: No module named paste.script
root@volker-desktop:/home/volker#

python2.6 /usr/bin/paster

Usage: /usr/bin/paster COMMAND
Usage: paster [paster_options] COMMAND [command_options]

Options:
  --version show program's version number and exit
  --plugin=PLUGINS Add a plugin to the list of commands (plugins are Egg
                    specs; will also require() the Egg)
  -h, --help Show this help message

Commands:
  create Create the file layout for a Python distribution
  help Display help
  make-config Install a package and create a fresh config file/directory
  points Show information about entry points
  post Run a request for the described application
  request Run a request for the described application

python3.0 /usr/bin/paster

Traceback (most recent call last):
  File "/usr/bin/paster", line 17, in <module>
    from paste.script import command
ImportError: No module named paste.script
root@volker-desktop:/home/volker#

  serve Serve the described application
  setup-app Setup an application, given a config file

Catanius (v-brustmeier) said : #24

available are:

/usr/bin/paste
/usr/bin/paster
/usr/bin/paster2.5
/usr/bin/paster2.6

apt-cache policy python-paste python-pastescript

python-paste:
  Installiert: 1.7.1-1ubuntu2
  Kandidat: 1.7.1-1ubuntu2
  Versions-Tabelle:
 *** 1.7.1-1ubuntu2 0
        500 http://ppa.launchpad.net jaunty/main Packages
        100 /var/lib/dpkg/status
     1.7.1-1ubuntu1 0
        500 http://de.archive.ubuntu.com jaunty/universe Packages
python-pastescript:
  Installiert: 1.7.3-3
  Kandidat: 1.7.3-3
  Versions-Tabelle:
 *** 1.7.3-3 0
        500 http://de.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status
root@volker-desktop:/home/volker#

Tom Hoffman (tom-hoffman) said : #25

So... does this tell us anything useful?

There is a problem with python2.5 installation of either Paste or PasteScript, and we need that version. I don't know how that can happen.

Should be like this:
$ ls -d /var/lib/python-support/python2.5/[pP]aste*
/var/lib/python-support/python2.5/paste
/var/lib/python-support/python2.5/Paste-1.7.1.egg-info
/var/lib/python-support/python2.5/PasteDeploy-1.3.2.egg-info
/var/lib/python-support/python2.5/PasteScript-1.7.3.egg-info

Some of the dirs is missing (and paste/script). Please tell me what. To be able to run schooltool, you can copy the missing directories from /var/lib/python-support/python2.6

Catanius (v-brustmeier) said : #27

As far as I can see they are all there!

volker@volker-desktop:~$ ls -d /var/lib/python-support/python2.5/paste
/var/lib/python-support/python2.5/paste
volker@volker-desktop:~$ ls -d /var/lib/python-support/python2.5/Paste-1.7.1.egg-info
/var/lib/python-support/python2.5/Paste-1.7.1.egg-info
volker@volker-desktop:~$ ls -d /var/lib/python-support/python2.5/PasteDeploy-1.3.2.egg-info
/var/lib/python-support/python2.5/PasteDeploy-1.3.2.egg-info
volker@volker-desktop:~$ ls -d /var/lib/python-support/python2.5/PasteScript-1.7.3.egg-info
/var/lib/python-support/python2.5/PasteScript-1.7.3.egg-info
volker@volker-desktop:~$

What to do next?

Catanius (v-brustmeier) said : #28

This trouble again:

I started a more intense search in my system und tryed to understand how python is working.
I found that init.d script in schooltool-common and started to give python and python paste a
version number that it looked like that:

#!/bin/sh -e
# TODO this needs to be broken out into functions like postgresql-common's init$

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PYTHON=/usr/bin/python2.5
PASTER=/usr/bin/paster2.5
NAME=$SERVER
DESC="$SERVER_DESC"
PIDFILE=/var/run/schooltool/$SERVER.pid
SCRIPTNAME=/etc/init.d/$SERVER
CONFIGFILE=/etc/schooltool/$SERVER/paste.ini

PASTER_ARGS="--user=schooltool --group=schooltool --daemon --pid-file=$PIDFILE $

# Gracefully exit if the package has been removed or is not configured.
test -x $PASTER || exit 0
test -f $CONFIGFILE || exit 0

. /lib/lsb/init-functions

with PYTHON=/usr/bin/python2.5
        PASTER=/usr/bin/paster2.5
I got the errors as before.

PYTHON=/usr/bin/python
PASTER=/usr/bin/paster

PYTHON=/usr/bin/python2.6
PASTER=/usr/bin/paster2.6

the error is gone but I can't get a process ID

Hm, maybe I'm doing the wrong thing, but I'm still in trouble and
school starts on monday - and urgently need a solution of this
paste.script problem - or I have to use a WINDOWS-SYSTEM !!!!

Please help,
Thank you

Ignas Mikalaj┼źnas (ignas) said : #29

School Tool does not work with python2.6

Your python or just python-paste installations are broken in some
way, all I can suggest is a clean reinstall of the system which might
or might not help...

Or debugging distutils and setuptools to see why they can't find the
paste package in python2.5 by comparing the steps performed in
python2.6 and python2.5 side by side.

import pkg_resources
pkg_resources.require('PasteScript')

might help you to get started.

Oh also you can try and set up a development sandbox as per
instructions here:
http://book.schooltool.org/htmlhelp/dev_sandbox.html

Ignas

Catanius (v-brustmeier) said : #30

SOLVED!

thank god it's done!
On a 64bit-AMD System you have to install python-support 1.0.3, python-paste 1.7.2-4, python-pastewebkit 1.0-3,
python-pastedeploy 1.3.3-2 and python-pastescript 1.7.3-3!
Now it's working fine. Thank'sto all who were trying to help me.

:-)

Tom Hoffman (tom-hoffman) said : #31

Excellent!

I still need to understand which version of which package fixed the problem. Packages you installed are from karmic, and I need to backport the problematic one to jaunty. Maybe the fix I have made to paste is not enough and I can fix it.

Catanius (v-brustmeier) said : #33

In my opinion the python-support package solved the problem.
I'll check the log files and will post it here if I find the reason.
I will setup another system in a week, maybe then I can identify
the package and what prevents the paste.import method from working
correctly. As I'm only using 64-bit systems it is essential for me too
to understand what happened.

Catanius (v-brustmeier) said : #34

Sorry the paste.script method I mentioned...

Can you help with this problem?

Provide an answer of your own, or ask Laurie Savage for more information if necessary.

To post a message you must log in.