add persons crashed

Bug #610870 reported by sudhir gaikwad
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool
Fix Released
High
Justas Sadzevičius
1.4
Fix Released
High
Gediminas Paulauskas

Bug Description

while addding new persons school tool crashed and on repition it happened concurrent

Tags: traceback
Revision history for this message
sudhir gaikwad (zissshh) wrote :

Exception

  UnicodeError: label empty or too long
Traceback

  File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 134, in publish
  result = publication.callObject(request, obj)
File "/usr/lib/python2.6/dist-packages/zope/app/publication/zopepublication.py", line 205, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 109, in mapply
  return debug_call(obj, args)
Extra information: <zope.browserpage.metaconfigure.PersonAddView object at 0xc817ecc>
File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 115, in debug_call
  return obj(*args)
File "/usr/lib/python2.6/dist-packages/z3c/form/form.py", line 189, in __call__
  self.update()
File "/usr/lib/python2.6/dist-packages/schooltool/basicperson/browser/person.py", line 154, in update
  self.fields += self.generateExtraFields()
File "/usr/lib/python2.6/dist-packages/schooltool/basicperson/browser/person.py", line 125, in generateExtraFields
  fields += field_desc.makeField()
File "/usr/lib/python2.6/dist-packages/schooltool/basicperson/demographics.py", line 189, in makeField
  vocabulary=IDNAVocabulary.fromValues(self.items)
File "/usr/lib/python2.6/dist-packages/zope/schema/vocabulary.py", line 98, in fromValues
  terms = [cls.createTerm(value) for value in values]
File "/usr/lib/python2.6/dist-packages/schooltool/basicperson/demographics.py", line 175, in createTerm
  token = value.encode('idna')
File "/usr/lib/python2.6/encodings/idna.py", line 164, in encode
  result.append(ToASCII(label))
File "/usr/lib/python2.6/encodings/idna.py", line 73, in ToASCII
  raise UnicodeError("label empty or too long")

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

Do you know what string triggered it?

Changed in schooltool:
assignee: nobody → Justas Sadzevičius (justas-pov)
Revision history for this message
sudhir gaikwad (zissshh) wrote :

how do you determine the string

Changed in schooltool:
status: New → Incomplete
status: Incomplete → New
Revision history for this message
sudhir gaikwad (zissshh) wrote :

Server Error

An internal server error has occurred. This most likely means that you have found a bug in SchoolTool. Please report it on the issue tracker.

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

Sorry for the jargon. What is the name or other word which seems to be triggering this? Can you add any people at all?

Revision history for this message
sudhir gaikwad (zissshh) wrote :

i cannot add new persons also i cant add people by csv

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

How did you install SchoolTool? What version are you using?

Revision history for this message
sudhir gaikwad (zissshh) wrote :

version 4.75 ,,i installed directly from the site as per instructions

Revision history for this message
Justas Sadzevičius (justas.sadzevicius) wrote :

It looks like some field in demographics has a very long (or empty) value.

Please open 'Manage' -> 'Demographics'.
Then click on each of the listed fields.
For each field that has 'List of values', please click edit. Then carefully select all, and paste here. Thanks!

The thing is, that newlines and spacing matter a lot. Each line *must* be shorter than 64 symbols.
This is definitely a bug, and we will fix it.

If you find a field with long line, and shorten it, you will be able to add persons again.

For example, this ethnicity demographics field will break person adding:
"
American Indian or Alaska Native
Asian
Black or African American
Native Hawaiian or Other Pacific Islander or any other ethnicity value for that matter
White
"

Can you please also paste the version shown in the bottom of the page?
Look for a string similar to "Your School - Server Running SchoolTool 1.5 (development)", next to the copyright.

security vulnerability: yes → no
visibility: private → public
Changed in schooltool:
status: New → Confirmed
importance: Undecided → High
tags: added: traceback
Revision history for this message
sudhir gaikwad (zissshh) wrote :

Shree Gurukul Study Center - Server Running SchoolTool 1.4
© The Shuttleworth Foundation 2003 - 2010: Supporting Social Innovation.
SchoolTool™ is a Trademark of The Shuttleworth Foundation.

Revision history for this message
sudhir gaikwad (zissshh) wrote :
Download full text (9.4 KiB)

the ethnicity list was long and tried to edit and save but cud not do so,,error

Exception

  LocationError: (<CustomEnumTextWidget 'form.widgets.items'>, 'label')
Traceback

  File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 134, in publish
  result = publication.callObject(request, obj)
File "/usr/lib/python2.6/dist-packages/zope/app/publication/zopepublication.py", line 205, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 109, in mapply
  return debug_call(obj, args)
Extra information: <zope.browserpage.metaconfigure.EnumFieldDescriptionEditView object at 0xc7c17cc>
File "/usr/lib/python2.6/dist-packages/zope/publisher/publish.py", line 115, in debug_call
  return obj(*args)
File "/usr/lib/python2.6/dist-packages/z3c/form/form.py", line 190, in __call__
  return self.render()
File "/usr/lib/python2.6/dist-packages/z3c/form/form.py", line 143, in render
  return self.template()
File "/usr/lib/python2.6/dist-packages/zope/browserpage/viewpagetemplatefile.py", line 83, in __call__
  return self.im_func(im_self, *args, **kw)
File "/usr/lib/python2.6/dist-packages/zope/browserpage/viewpagetemplatefile.py", line 51, in __call__
  sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/usr/lib/python2.6/dist-packages/zope/pagetemplate/pagetemplate.py", line 115, in pt_render
  strictinsert=0, sourceAnnotations=sourceAnnotations)()
Template "/usr/lib/python2.6/dist-packages/schooltool/basicperson/browser/templates/person_add.pt"
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 271, in __call__
  self.interpret(self.program)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 888, in do_useMacro
  self.interpret(macro)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 518, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 513, in no_tag
  self.interpret(program)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 954, in do_defineSlot
  self.interpret(block)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 343, in interpret
  handlers[opcode](self, args)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 533, in do_optTag_tal
  self.do_optTag(stuff)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 518, in do_optTag
  return self.no_tag(start, program)
File "/usr/lib/python2.6/dist-packages/zope/tal/talinterpreter.py", line 513, in no_tag
  self.interpret(program)
File "/usr/lib/python2.6/dist-packages/zope/...

Read more...

Revision history for this message
sudhir gaikwad (zissshh) wrote :

thank you :) it worked,,,but is there a limit to adding list of values

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

Could you pass on exactly what values you'd like to have in the list?

Revision history for this message
Justas Sadzevičius (justas.sadzevicius) wrote :

Technically the current limit is that a single value cannot be longer that 64 characters.
Though I noticed that the form does not handle empty lines well (or lines consisting only of whitespace for that matter).

Revision history for this message
sudhir gaikwad (zissshh) wrote : Re: [Bug 610870] Re: add persons crashed

i didnt add any longer characters but still the problem croped up:)
i had more of words separated by commas,then while reediting i pressed enter
after every word
              SuDHiR GaiKWAD
            GRAPHIC SCULPTOR
         www.coroflot.com/zissshh
           www.flickr.com/zissshh

2010/8/2 Justas Sadzevičius <email address hidden>

> Technically the current limit is that a single value cannot be longer that
> 64 characters.
> Though I noticed that the form does not handle empty lines well (or lines
> consisting only of whitespace for that matter).
>
> --
> add persons crashed
> https://bugs.launchpad.net/bugs/610870
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in SchoolTool: Confirmed
>
> Bug description:
> while addding new persons school tool crashed and on repition it happened
> concurrent
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/schooltool/+bug/610870/+subscribe
>

Revision history for this message
Justas Sadzevičius (justas.sadzevicius) wrote :

Added error checking to the demographics enum list edit form.

Changed in schooltool:
status: Confirmed → Fix Committed
Changed in schooltool:
milestone: none → 1.5.1
Changed in schooltool:
status: Fix Committed → Fix Released
Revision history for this message
sudhir gaikwad (zissshh) wrote :

LinkedIn
------------

Bug,

I'd like to add you to my professional network on LinkedIn.

- Sudhir

Sudhir Gaikwad
Aligner at Lone Lantern Works
Mumbai Area, India

Confirm that you know Sudhir Gaikwad:
https://www.linkedin.com/e/-imfs2k-hl3h1m4m-62/isd/9162401854/UkoJ7Flp/?hs=false&tok=3R-yWANrvGu5U1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-imfs2k-hl3h1m4m-62/X4-s3a70PzuqEbO4r8PfY5U0CkaHK1o-wEauyj4/goo/610870%40bugs%2Elaunchpad%2Enet/20061/I5394225439_1/?hs=false&tok=3qHnCZcOrGu5U1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.