adding new users after deleting database

Bug #298135 reported by Brent Ward on 2008-11-14
10
Affects Status Importance Assigned to Milestone
SchoolTool
Critical
Ignas Mikalajūnas

Bug Description

Had the sample data installed. Deleted the database file. restarted Schooltool. Can sign in as manager. However, when trying to add new users, I get this error:

Exception

  KeyError: 'groups'
Traceback

  File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py", line 133, in publish
  result = publication.callObject(request, obj)
File "/usr/lib/python2.4/site-packages/zope/app/publication/zopepublication.py", line 167, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py", line 108, in mapply
  return debug_call(obj, args)
Extra information: <zope.app.publisher.browser.viewmeta.PersonAddView object at 0x9bae0cc>
File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py", line 114, in debug_call
  return obj(*args)
File "/usr/lib/python2.4/site-packages/z3c/form/form.py", line 189, in __call__
  self.update()
File "/usr/lib/python2.4/site-packages/z3c/form/form.py", line 186, in update
  self.actions.execute()
File "/usr/lib/python2.4/site-packages/z3c/form/action.py", line 99, in execute
  result = handler()
File "/usr/lib/python2.4/site-packages/z3c/form/button.py", line 302, in __call__
  return handler(self.form, self.action)
File "/usr/lib/python2.4/site-packages/z3c/form/button.py", line 170, in __call__
  return self.func(form, action)
File "/usr/lib/python2.4/site-packages/schooltool/basicperson/browser/person.py", line 136, in handleAdd
  obj = self.createAndAdd(data)
File "/usr/lib/python2.4/site-packages/z3c/form/form.py", line 217, in createAndAdd
  self.add(obj)
File "/usr/lib/python2.4/site-packages/schooltool/basicperson/browser/person.py", line 165, in add
  groups = ISchoolToolApplication(None)['groups']
File "/usr/lib/python2.4/site-packages/zope/app/container/sample.py", line 60, in __getitem__
  return self.__data[key]
File "/usr/lib/python2.4/UserDict.py", line 17, in __getitem__
  def __getitem__(self, key): return self.data[key]

Thoughts? Suggestions? I have an Ubuntu server, Hardy edition.

Brent Ward (bmward1) wrote :
Tom Hoffman (tom-hoffman) wrote :

Is this after upgrading to SchoolTool 2010.8? Check your footer for the version.

I actually had upgraded to 2008.10.  I had installed the sample data, and the person who will be the primary site manager was done looking around at the program, and was ready to start from scratch.

--- On Fri, 11/14/08, Tom Hoffman <email address hidden> wrote:
From: Tom Hoffman <email address hidden>
Subject: [Bug 298135] Re: adding new users after deleting database
To: <email address hidden>
Date: Friday, November 14, 2008, 2:22 PM

Is this after upgrading to SchoolTool 2010.8? Check your footer for the
version.

--
adding new users after deleting database
https://bugs.launchpad.net/bugs/298135
You received this bug notification because you are a direct subscriber
of the bug.

Status in SchoolTool: New

Bug description:
Had the sample data installed. Deleted the database file. restarted
Schooltool. Can sign in as manager. However, when trying to add new users, I
get this error:

Exception

  KeyError: 'groups'
Traceback

  File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py",
line 133, in publish
  result = publication.callObject(request, obj)
File
"/usr/lib/python2.4/site-packages/zope/app/publication/zopepublication.py",
line 167, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py",
line 108, in mapply
  return debug_call(obj, args)
Extra information: <zope.app.publisher.browser.viewmeta.PersonAddView object
at 0x9bae0cc>
File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py",
line 114, in debug_call
  return obj(*args)
File "/usr/lib/python2.4/site-packages/z3c/form/form.py", line 189,
in __call__
  self.update()
File "/usr/lib/python2.4/site-packages/z3c/form/form.py", line 186,
in update
  self.actions.execute()
File "/usr/lib/python2.4/site-packages/z3c/form/action.py", line 99,
in execute
  result = handler()
File "/usr/lib/python2.4/site-packages/z3c/form/button.py", line 302,
in __call__
  return handler(self.form, self.action)
File "/usr/lib/python2.4/site-packages/z3c/form/button.py", line 170,
in __call__
  return self.func(form, action)
File
"/usr/lib/python2.4/site-packages/schooltool/basicperson/browser/person.py",
line 136, in handleAdd
  obj = self.createAndAdd(data)
File "/usr/lib/python2.4/site-packages/z3c/form/form.py", line 217,
in createAndAdd
  self.add(obj)
File
"/usr/lib/python2.4/site-packages/schooltool/basicperson/browser/person.py",
line 165, in add
  groups = ISchoolToolApplication(None)['groups']
File "/usr/lib/python2.4/site-packages/zope/app/container/sample.py",
line 60, in __getitem__
  return self.__data[key]
File "/usr/lib/python2.4/UserDict.py", line 17, in __getitem__
  def __getitem__(self, key): return self.data[key]

Thoughts? Suggestions? I have an Ubuntu server, Hardy edition.

Tom Hoffman (tom-hoffman) wrote :

OK. This is a common class of bugs in the transition to the new version. Basically, groups, and a lot of other things are now organized by year, so you can keep track of things in a sane manner year to year. It is a big reshuffling, though, so there are a few places that didn't get updated. We should be able to push a bugfix next week that clears this problem up in a couple of places.

Brent Ward (bmward1) wrote :

OK.  Thanks for letting me know.  I did figure out that when I added a user just by name, without selecting groups initially, I did not get the error.  It was only when I select a group when trying to create the user also.

--- On Fri, 11/14/08, Tom Hoffman <email address hidden> wrote:
From: Tom Hoffman <email address hidden>
Subject: [Bug 298135] Re: adding new users after deleting database
To: <email address hidden>
Date: Friday, November 14, 2008, 4:14 PM

OK. This is a common class of bugs in the transition to the new
version. Basically, groups, and a lot of other things are now organized
by year, so you can keep track of things in a sane manner year to year.
It is a big reshuffling, though, so there are a few places that didn't
get updated. We should be able to push a bugfix next week that clears
this problem up in a couple of places.

--
adding new users after deleting database
https://bugs.launchpad.net/bugs/298135
You received this bug notification because you are a direct subscriber
of the bug.

Status in SchoolTool: New

Bug description:
Had the sample data installed. Deleted the database file. restarted
Schooltool. Can sign in as manager. However, when trying to add new users, I
get this error:

Exception

  KeyError: 'groups'
Traceback

  File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py",
line 133, in publish
  result = publication.callObject(request, obj)
File
"/usr/lib/python2.4/site-packages/zope/app/publication/zopepublication.py",
line 167, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py",
line 108, in mapply
  return debug_call(obj, args)
Extra information: <zope.app.publisher.browser.viewmeta.PersonAddView object
at 0x9bae0cc>
File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py",
line 114, in debug_call
  return obj(*args)
File "/usr/lib/python2.4/site-packages/z3c/form/form.py", line 189,
in __call__
  self.update()
File "/usr/lib/python2.4/site-packages/z3c/form/form.py", line 186,
in update
  self.actions.execute()
File "/usr/lib/python2.4/site-packages/z3c/form/action.py", line 99,
in execute
  result = handler()
File "/usr/lib/python2.4/site-packages/z3c/form/button.py", line 302,
in __call__
  return handler(self.form, self.action)
File "/usr/lib/python2.4/site-packages/z3c/form/button.py", line 170,
in __call__
  return self.func(form, action)
File
"/usr/lib/python2.4/site-packages/schooltool/basicperson/browser/person.py",
line 136, in handleAdd
  obj = self.createAndAdd(data)
File "/usr/lib/python2.4/site-packages/z3c/form/form.py", line 217,
in createAndAdd
  self.add(obj)
File
"/usr/lib/python2.4/site-packages/schooltool/basicperson/browser/person.py",
line 165, in add
  groups = ISchoolToolApplication(None)['groups']
File "/usr/lib/python2.4/site-packages/zope/app/container/sample.py",
line 60, in __getitem__
  return self.__data[key]
File "/usr/lib/python2.4/UserDict.py", line 17, in __getitem__
  def __getitem__(self, key): return self.data[key]

Thoughts? Suggestions? I have an Ubuntu server, Hardy edition.

Ignas Mikalajūnas (ignas) wrote :

To workaround it at the moment - *do not* select anything in the Groups dropdown when adding a person.

Changed in schooltool:
assignee: nobody → ignas
importance: Undecided → Critical
status: New → Confirmed
Changed in schooltool:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments