Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

string index out of range

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


justin.dunsworth at gmail

Nov 24, 2009, 2:22 PM

Post #1 of 4 (1379 views)
Permalink
string index out of range

I have been using Zope 2.10.4-final, python 2.4.4, win32 for quite awhile...
I recently started a new project using Zope 2.11.4-final, python 2.4.4,
win32 and proceeded with my normal programming but I am receiving an error
that I haven't received before.

Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module OFS.DTMLDocument, line 145, in __call__
- <DTMLDocument at /gldb_root/processlogin>
- URL: http://localhost/processlogin/manage_main
- Physical Path: /gldb_root/processlogin
Module zope.contenttype, line 76, in guess_content_type
Module zope.contenttype, line 39, in text_type
IndexError: string index out of range

I did a little deductive reasoning and took parts out until it didn't error
out anymore and it seemed when I took the following lines out it didn't
error:

<dtml-call "RootSQLMethods.user.SetLastLogin(_.None,_)">
<dtml-call "RESPONSE.redirect(BASE1+'/')">

If I have both, one, or the other in it will throw the error. If I take both
of these out then it will not.

Any assistance is appreciated... if I need to provide more information
please let me know.


tseaver at palladion

Nov 24, 2009, 6:47 PM

Post #2 of 4 (1230 views)
Permalink
Re: string index out of range [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Justin Dunsworth wrote:
> I have been using Zope 2.10.4-final, python 2.4.4, win32 for quite awhile...
> I recently started a new project using Zope 2.11.4-final, python 2.4.4,
> win32 and proceeded with my normal programming but I am receiving an error
> that I haven't received before.
>
> Traceback (innermost last):
> Module ZPublisher.Publish, line 119, in publish
> Module ZPublisher.mapply, line 88, in mapply
> Module ZPublisher.Publish, line 42, in call_object
> Module OFS.DTMLDocument, line 145, in __call__
> - <DTMLDocument at /gldb_root/processlogin>
> - URL: http://localhost/processlogin/manage_main
> - Physical Path: /gldb_root/processlogin
> Module zope.contenttype, line 76, in guess_content_type
> Module zope.contenttype, line 39, in text_type
> IndexError: string index out of range
>
> I did a little deductive reasoning and took parts out until it didn't error
> out anymore and it seemed when I took the following lines out it didn't
> error:
>
> <dtml-call "RootSQLMethods.user.SetLastLogin(_.None,_)">
> <dtml-call "RESPONSE.redirect(BASE1+'/')">
>
> If I have both, one, or the other in it will throw the error. If I take both
> of these out then it will not.
>
> Any assistance is appreciated... if I need to provide more information
> please let me know.

The traceback would indicate that the DTMLDocumet at
'/gldb_rootprocesslogin' is the culprit here. We can't help you unless
you provide the text of that method, along with the values it uses from
the request (dummies would work, likely).


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver [at] palladion
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksMmtAACgkQ+gerLs4ltQ7N5ACfWyrBWl/ZbpwKR8i1IaCzzbrl
Vo8AnjRIFPPKiK4+KKkePitnYIfbVtEd
=KRRU
-----END PGP SIGNATURE-----

_______________________________________________
Zope maillist - Zope [at] zope
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


justin.dunsworth at gmail

Nov 24, 2009, 7:37 PM

Post #3 of 4 (1234 views)
Permalink
Re: string index out of range [In reply to]

On Tue, Nov 24, 2009 at 8:47 PM, Tres Seaver <tseaver [at] palladion> wrote:

>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Justin Dunsworth wrote:
> > I have been using Zope 2.10.4-final, python 2.4.4, win32 for quite
> awhile...
> > I recently started a new project using Zope 2.11.4-final, python 2.4.4,
> > win32 and proceeded with my normal programming but I am receiving an
> error
> > that I haven't received before.
> >
> > Traceback (innermost last):
> > Module ZPublisher.Publish, line 119, in publish
> > Module ZPublisher.mapply, line 88, in mapply
> > Module ZPublisher.Publish, line 42, in call_object
> > Module OFS.DTMLDocument, line 145, in __call__
> > - <DTMLDocument at /gldb_root/processlogin>
> > - URL: http://localhost/processlogin/manage_main
> > - Physical Path: /gldb_root/processlogin
> > Module zope.contenttype, line 76, in guess_content_type
> > Module zope.contenttype, line 39, in text_type
> > IndexError: string index out of range
> >
> > I did a little deductive reasoning and took parts out until it didn't
> error
> > out anymore and it seemed when I took the following lines out it didn't
> > error:
> >
> > <dtml-call "RootSQLMethods.user.SetLastLogin(_.None,_)">
> > <dtml-call "RESPONSE.redirect(BASE1+'/')">
> >
> > If I have both, one, or the other in it will throw the error. If I take
> both
> > of these out then it will not.
> >
> > Any assistance is appreciated... if I need to provide more information
> > please let me know.
>
> The traceback would indicate that the DTMLDocumet at
> '/gldb_rootprocesslogin' is the culprit here. We can't help you unless
> you provide the text of that method, along with the values it uses from
> the request (dummies would work, likely).
>
>
> Tres.
> - --
> ===================================================================
> Tres Seaver +1 540-429-0999 tseaver [at] palladion
> Palladion Software "Excellence by Design" http://palladion.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAksMmtAACgkQ+gerLs4ltQ7N5ACfWyrBWl/ZbpwKR8i1IaCzzbrl
> Vo8AnjRIFPPKiK4+KKkePitnYIfbVtEd
> =KRRU
> -----END PGP SIGNATURE-----
>
>
I found out that there was a bug fix from 2.10.4 to 2.11.4 that if the
document type is plain text (no html headers) and if it has 14 character
whitespace at the beginning an error will be thrown. The way I had
processlogin document set up is to act as a redirect that captures some
details about the user and stores it into the database then redirects to the
member index. However, since I didn't add any HTML headers it treated it as
a plain text document and since it was way down on the list there was a ton
of whitespaces... and thus the error.

I got some help in IRC to figure this out and I had forgotten to respond
saying I got it fixed here...

Thanks for the assistance, though!
Justin Dunsworth


simon at joyful

Nov 24, 2009, 8:54 PM

Post #4 of 4 (1238 views)
Permalink
Re: string index out of range [In reply to]

Now reported as https://bugs.launchpad.net/zope2/+bug/487998 .

_______________________________________________
Zope maillist - Zope [at] zope
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )

Zope users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.