[Setup] Windows XP install failure with Plone 2.1.2 - index out of range on empty MIME type extension

Tom Morris tfmorris at gmail.com
Wed Feb 22 01:37:00 UTC 2006


Chris Shirer posted a query about this problem (attached) over a week ago
without any apparent resolution.  I just tried installing Plone for the
first time today with exactly the same results and error messages. (Don't
you love it when your first exposure to a product is that it can't even
complete a basic vanilla installation?)

I dug into it a little bit and discovered that there's a bug in Plone's MIME
type handling that will cause it to die ungracefully if the file extension
associated with the MIME type is the empty string (as opposed to null or
missing, which it does handle).

I'm not sure why they're shipping a kit that can't even be installed, but if
anyone else runs into the problem, you can patch your installation by adding
the two indicated lines to the initialize function at the bottom of
<ploneroot>\Data\Products\MimetypesRegistry\mime_types\windows_mimetypes.py

    for mt in get_mime_types():
        ext = get_ext_for_mimetype(mt)
+       if ext == "":
+           ext = None
        if ext is None:
            continue

Hope this saves someone else the same aggravation...

Tom

-----
From: Chris Shirer 
Date: Sun Feb 12 10:53:26 EST 2006
Subject: [Setup] Install error: Executing the command 'setupSite.py' failed

I'm on Windows XP, all updates to the OS installed, and get the following
message when installing Plone (v. 2.1.2, build 3938):

'Executing the command 'setupSite.py' failed.  Index error:  String index
out of range.'  
 
Despite the installation error message, I can then open and log into Plone
and the Zope Management Interface, BUT, receive the same 'string index'
error when trying to set up the foundation of a new 'plone site'.  The
sequence goes:

-- Choose 'plone site' from the 'Add' drop-down.
-- Receive the naming screen in which there are options for 'ID', 'Title'
and 'Description'.  ('Membership Source' is not appearing.)
-- I enter ASCII text only names for ID and Title and receive the following
error:

Site Error
An error was encountered while publishing this resource. 

Error Type: IndexError
Error Value: string index out of range

Visiting the Exception Traceback log shows this:

Request URL http://localhost:8080/manage_addProduct/CMFPlone/manage_addSite 
Exception Type IndexError 
Exception Value string index out of range 

Traceback (innermost last): 

Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 320, in
installProduct
__traceback_info__: ('MimetypesRegistry',) 
Module Products.ExternalMethod.ExternalMethod, line 225, in __call__
__traceback_info__: ((<PloneSite instance at 03300530>,), {}, None) 
Module C:\Program Files\Plone
2\Data\Products\MimetypesRegistry\Extensions\Install.py, line 24, in install

Module Products.CMFCore.utils, line 627, in manage_addTool 
Module Products.MimetypesRegistry.MimeTypesRegistry, line 99, in __init__ 
Module Products.MimetypesRegistry.mime_types, line 13, in initialize 
Module Products.MimetypesRegistry.mime_types.py_mimetypes, line 44, in
initialize 
IndexError: string index out of range 

Is there something I can do to get the installation to recognize and execute
the 'setupSite.py' command, or, install it in a particular place 'by hand'?

Thanks for any assistance!

Chris





More information about the Setup mailing list