When selecting the explorer theme with MoinMoin 1.8.2, I get:

NameError

name 'set' is not defined

If you want to report a bug, please save this page and attach it to your bug report.

    * Show debugging information
    * Report bug
    * Visit MoinMoin wiki

Traceback

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

   1.

      /usr/lib/python2.3/site-packages/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.request_cgi.Request object>)
         1. 1324 try:
         2. 1325 # nothing we can do about further failures!
         3. 1326 self.fail(err)
         4. 1327 except:
         5. 1328 pass
          * self = <MoinMoin.request.request_cgi.Request object>
          * self.fail = <bound method Request.fail of <MoinMoin.request.request_cgi.Request object>>
          * err = <exceptions.NameError instance>
   2.

      /usr/lib/python2.3/site-packages/MoinMoin/action/userprefs.py in execute (pagename=u'ICC', request=<MoinMoin.request.request_cgi.Request object>)
         1. 93 return Page.Page(request, pagename).send_page()
         2. 94
         3. 95 text, title, msg_class, msg = _create_page(request)
         4. 96 if title:
         5. 97 # XXX: we would like to make "Settings" here a link back
          * text undefined
          * title undefined
          * msg_class undefined
          * msg undefined
          * global _create_page = <function _create_page>
          * request = <MoinMoin.request.request_cgi.Request object>
   3.

      /usr/lib/python2.3/site-packages/MoinMoin/action/userprefs.py in _create_page (request=<MoinMoin.request.request_cgi.Request object>, cancel=False)
         1. 65
         2. 66 if 'handler' in request.form:
         3. 67 msg_class, msg = _handle_submission(request)
         4. 68 else:
         5. 69 msg_class, msg = None, None
          * msg_class undefined
          * msg undefined
          * global _handle_submission = <function _handle_submission>
          * request = <MoinMoin.request.request_cgi.Request object>
   4.

      /usr/lib/python2.3/site-packages/MoinMoin/action/userprefs.py in _handle_submission (request=<MoinMoin.request.request_cgi.Request object>)
         1. 32 if not obj.allowed():
         2. 33 return None, None
         3. 34 res = obj.handle_form()
         4. 35 if isinstance(res, tuple):
         5. 36 return res
          * res undefined
          * obj = <MoinMoin.userprefs.prefs.Settings object>
          * obj.handle_form = <bound method Settings.handle_form of <MoinMoin.userprefs.prefs.Settings object>>
   5.

      /usr/lib/python2.3/site-packages/MoinMoin/userprefs/prefs.py in handle_form (self=<MoinMoin.userprefs.prefs.Settings object>)
         1. 232
         2. 233 if form.has_key('save'): # Save user profile
         3. 234 return self._save_user_prefs()
         4. 235
         5. 236 # form generation part
          * self = <MoinMoin.userprefs.prefs.Settings object>
          * self._save_user_prefs = <bound method Settings._save_user_prefs of <MoinMoin.userprefs.prefs.Settings object>>
   6.

      /usr/lib/python2.3/site-packages/MoinMoin/userprefs/prefs.py in _save_user_prefs (self=<MoinMoin.userprefs.prefs.Settings object>)
         1. 164 # nothing has been emitted yet)
         2. 165 request.user.theme_name = theme_name
         3. 166 if request.loadTheme(theme_name) > 0:
         4. 167 theme_name = wikiutil.escape(theme_name)
         5. 168 return 'error', _("The theme '%(theme_name)s' could not be loaded!") % locals()
          * request = <MoinMoin.request.request_cgi.Request object>
          * request.loadTheme = <bound method Request.loadTheme of <MoinMoin.request.request_cgi.Request object>>
          * theme_name = u'explorer'
   7.

      /usr/lib/python2.3/site-packages/MoinMoin/request/__init__.py in loadTheme (self=<MoinMoin.request.request_cgi.Request object>, theme_name=u'explorer')
         1. 746 except wikiutil.PluginMissingError:
         2. 747 fallback = 2
         3. 748 from MoinMoin.theme.modern import Theme
         4. 749
         5. 750 self.theme = Theme(self)
          * MoinMoin undefined
          * Theme undefined
   8.

      /usr/lib/python2.3/site-packages/MoinMoin/wikiutil.py in importPlugin (cfg=<wikiconfig.Config object>, kind='theme', name=u'explorer', function='Theme')
         1. 1109 return importWikiPlugin(cfg, kind, name, function)
         2. 1110 except PluginMissingError:
         3. 1111 return importBuiltinPlugin(kind, name, function)
         4. 1112
         5. 1113
          * global importBuiltinPlugin = <function importBuiltinPlugin>
          * kind = 'theme'
          * name = u'explorer'
          * function = 'Theme'
   9.

      /usr/lib/python2.3/site-packages/MoinMoin/wikiutil.py in importWikiPlugin (cfg=<wikiconfig.Config object>, kind='theme', name=u'explorer', function='Theme')
         1. 1122 raise PluginMissingError()
         2. 1123 moduleName = '%s.%s' % (modname, name)
         3. 1124 return importNameFromPlugin(moduleName, function)
         4. 1125
         5. 1126
          * global importNameFromPlugin = <function importNameFromPlugin>
          * moduleName = u'wikiconfig.p_c3f95f835504be79f8d98167e6a31ddb883f9bde.theme.explorer'
          * function = 'Theme'
  10.

      /usr/lib/python2.3/site-packages/MoinMoin/wikiutil.py in importNameFromPlugin (moduleName=u'wikiconfig.p_c3f95f835504be79f8d98167e6a31ddb883f9bde.theme.explorer', name='Theme')
         1. 1146 else:
         2. 1147 fromlist = [name]
         3. 1148 module = __import__(moduleName, globals(), {}, fromlist)
         4. 1149 if fromlist:
         5. 1150 # module has the obj for module <moduleName>
          * module undefined
          * builtin __import__ = <built-in function __import__>
          * moduleName = u'wikiconfig.p_c3f95f835504be79f8d98167e6a31ddb883f9bde.theme.explorer'
          * builtin globals = <built-in function globals>
          * fromlist = ['Theme']
  11.

      /usr/share/moin/IT/data/plugin/theme/explorer.py in ?
         1. 697
         2. 698
         3. 699 class WikiTree:
         4. 700 """
         5. 701 The wiki tree represents the tree of all pages (resp. categories) and
          * WikiTree undefined
  12.

      /usr/share/moin/IT/data/plugin/theme/explorer.py in WikiTree ()
         1. 729 del _
         2. 730
         3. 731 touched = set([]) # Nodes changed since last tree update
         4. 732
         5. 733
          * touched undefined
          * set undefined

NameError

name 'set' is not defined

    * args = ("name 'set' is not defined",)

System Details

    * Date: Mon, 09 Feb 2009 21:49:37 +0000
    * Platform: Linux  2.6.9-78.0.1.ELsmp #1 SMP Tue Aug 5 11:02:47 EDT 2008 i686
    * Python: Python 2.3.4 (/usr/bin/python)
    * MoinMoin: Release 1.8.2 (release)

Solution

(!) The code likely misses this line:

# needed for python 2.3 compatibility
from MoinMoin.support.python_compatibility import set

A workaround is to use a newer Python (>= 2.4).

MoinMoin: ThemeMarket/Explorer/Bugs/SetIsNotDefined (last edited 2009-02-10 07:40:15 by ThomasWaldmann)