Description

Describe the bug...

The system is a Debian Intrepid System using the package manager 1.7.1. It was just converted from 1.5.8. When I login and click of the settings I get an invalid Attribute exception from python.

Steps to reproduce

Its very simple, just log in and click on settings.

Example

--> -->

AttributeError

'module' object has no attribute 'BytesIO'

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

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. /var/lib/python-support/python2.5/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.request_modpython.Request object at 0xba54766c>)

    1. 1305 self.page.send_page()
    2. 1306 else:
    3. 1307 handler(self.page.page_name, self)
    4. 1308
    5. 1309 # every action that didn't use to raise MoinMoinFinish must call this now:
    • handler = <function execute at 0xba6bf72c>
    • self = <MoinMoin.request.request_modpython.Request object at 0xba54766c>
    • self.page = <MoinMoin.Page.Page object at 0xba54760c>
    • self.page.page_name = u'SundryResearch'
  2. /var/lib/python-support/python2.5/MoinMoin/action/userprefs.py in execute (pagename=u'SundryResearch', request=<MoinMoin.request.request_modpython.Request object at 0xba54766c>)

    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 at 0xba6bf64c>
    • request = <MoinMoin.request.request_modpython.Request object at 0xba54766c>
  3. /var/lib/python-support/python2.5/MoinMoin/action/userprefs.py in _create_page (request=<MoinMoin.request.request_modpython.Request object at 0xba54766c>, cancel=False)

    1. 81
    2. 82 if not obj or not obj.allowed():
    3. 83 return _create_prefs_page(request), None, msg_class, msg
    4. 84
    5. 85 return obj.create_form(), obj.title, msg_class, msg
    • global _create_prefs_page = <function _create_prefs_page at 0xba6bf6bc>
    • request = <MoinMoin.request.request_modpython.Request object at 0xba54766c>
    • builtin None = None
    • msg_class = None
    • msg = None
  4. /var/lib/python-support/python2.5/MoinMoin/action/userprefs.py in _create_prefs_page (request=<MoinMoin.request.request_modpython.Request object at 0xba54766c>, sel=None)

    1. 50 if sub in request.cfg.userprefs_disabled:
    2. 51 continue
    3. 52 cls = wikiutil.importPlugin(request.cfg, 'userprefs', sub, 'Settings')
    4. 53 obj = cls(request)
    5. 54 if not obj.allowed():
    • cls = <class 'MoinMoin.userprefs.notification.Settings'>
    • global wikiutil = <module 'MoinMoin.wikiutil' from '/var/lib/python-support/python2.5/MoinMoin/wikiutil.pyc'>
    • wikiutil.importPlugin = <function importPlugin at 0xba353c34>
    • request = <MoinMoin.request.request_modpython.Request object at 0xba54766c>
    • request.cfg = <wikiconfig.Config object at 0xba3ee2cc>
    • sub = 'oid'
  5. /var/lib/python-support/python2.5/MoinMoin/wikiutil.py in importPlugin (cfg=<wikiconfig.Config object at 0xba3ee2cc>, kind='userprefs', name='oid', function='Settings')

    1. 1107 return importWikiPlugin(cfg, kind, name, function)
    2. 1108 except PluginMissingError:
    3. 1109 return importBuiltinPlugin(kind, name, function)
    4. 1110
    5. 1111
    • global importBuiltinPlugin = <function importBuiltinPlugin at 0xba353d14>
    • kind = 'userprefs'
    • name = 'oid'
    • function = 'Settings'
  6. /var/lib/python-support/python2.5/MoinMoin/wikiutil.py in importBuiltinPlugin (kind='userprefs', name='oid', function='Settings')

    1. 1129 raise PluginMissingError
    2. 1130 moduleName = 'MoinMoin.%s.%s' % (kind, name)
    3. 1131 return importNameFromPlugin(moduleName, function)
    4. 1132
    5. 1133
    • global importNameFromPlugin = <function importNameFromPlugin at 0xba353d4c>
    • moduleName = 'MoinMoin.userprefs.oid'
    • function = 'Settings'
  7. /var/lib/python-support/python2.5/MoinMoin/wikiutil.py in importNameFromPlugin (moduleName='MoinMoin.userprefs.oid', name='Settings')

    1. 1142 else:
    2. 1143 fromlist = [name]
    3. 1144 module = __import__(moduleName, globals(), {}, fromlist)
    4. 1145 if fromlist:
    5. 1146 # module has the obj for module <moduleName>
    • module undefined
    • builtin __import__ = <built-in function __import__>
    • moduleName = 'MoinMoin.userprefs.oid'
    • builtin globals = <built-in function globals>
    • fromlist = ['Settings']
  8. /var/lib/python-support/python2.5/MoinMoin/userprefs/oid.py in ()

    1. 12 import sha
    2. 13 try:
    3. 14 from MoinMoin.auth.openidrp import OpenIDAuth
    4. 15 from MoinMoin.util.moinoid import MoinOpenIDStore
    5. 16 from openid.consumer import consumer
    • MoinMoin undefined
    • OpenIDAuth undefined
  9. /var/lib/python-support/python2.5/MoinMoin/auth/openidrp.py in ()

    1. 6 @license: GNU GPL, see COPYING for details.
    2. 7 """
    3. 8 from MoinMoin.util.moinoid import MoinOpenIDStore
    4. 9 from MoinMoin import user
    5. 10 from MoinMoin.auth import BaseAuth
    • MoinMoin undefined
    • MoinOpenIDStore undefined
  10. /var/lib/python-support/python2.5/MoinMoin/util/moinoid.py in ()

    1. 12 from openid import oidutil
    2. 13 from openid.store.interface import OpenIDStore
    3. 14 from openid.association import Association
    4. 15 from openid.store import nonce
    5. 16
    • openid undefined
    • Association undefined
  11. /usr/lib/python2.5/site-packages/openid/association.py in ()

    1. 38 from openid import kvform
    2. 39 from openid import oidutil
    3. 40 from openid.message import OPENID_NS
    4. 41
    5. 42 all_association_types = [
    • openid undefined
    • OPENID_NS undefined
  12. /usr/lib/python2.5/site-packages/openid/message.py in ()

    1. 12 from openid import kvform
    2. 13 try:
    3. 14 ElementTree = oidutil.importElementTree()
    4. 15 except ImportError:
    5. 16 # No elementtree found, so give up, but don't fail to import,
    • ElementTree undefined
    • oidutil = None
    • oidutil.importElementTree undefined
  13. /usr/lib/python2.5/site-packages/openid/oidutil.py in importElementTree (module_names=['lxml.etree', 'xml.etree.cElementTree', 'xml.etree.ElementTree', 'cElementTree', 'elementtree.ElementTree'])

    1. 56 for mod_name in module_names:
    2. 57 try:
    3. 58 ElementTree = __import__(mod_name, None, None, ['unused'])
    4. 59 except ImportError:
    5. 60 pass
    • ElementTree undefined
    • builtin __import__ = <built-in function __import__>
    • mod_name = 'lxml.etree'
    • builtin None = None
  14. /lxml.etree.pyx in lxml.etree (src/lxml/lxml.etree.c:119415) ()

AttributeError

'module' object has no attribute 'BytesIO'

  • args = ("'module' object has no attribute 'BytesIO'",)
  • message = "'module' object has no attribute 'BytesIO'"

System Details

  • Date: Sat, 29 Nov 2008 22:07:57 +0000
  • Platform: Linux bluebeard 2.6.27-10-generic #1 SMP Fri Nov 21 12:00:22 UTC 2008 i686
  • Python: Python 2.5.2 (/usr/bin/python)
  • MoinMoin: Release 1.7.1 (release)
bug-report.html

Component selection

Details

MoinMoin Version

1.7.1

OS and Version

Ubuntu Intrepid

Python Version

2.5

Server Setup

Debian python-moinmoin

Server Details

mod_python 3 2iki server

Language you are using the wiki in (set in the browser/UserPreferences)

English

Workaround

Dont Know

If fixing openid / elementree does not help, maybe kill the openid stuff from MoinMoin/userprefs/ if you don't use openid.

Discussion

Thanks for the response. I did get mod_wsgi installed and while deamons start and run and seems faster the same bug is reproduced under mod_wsgi. I also got moin.cgi working on an entirely different testing machine with no problems. This is clearly something about this machine but at this point I don't know what. Its an older machine a Dual Processor Athalon AMD family(6) model(6) stepping(1). Interestingly enough I eventually got moin.cgi running on this machine but userprefs.py simply hangs in that case after a click on settings. This machine is configured with three separate wikis all running via a wikiconfig.py and 3 separate WSGIScriptAlias directives. Works fine. Again thanks for the response and let me know if you want any logging or debugging traces. I can set up debug mode in apache2 and also set up logging without any problem. Thanks again for your time. If you know a workaround or a method to debug this let me know and I will try to help out

I could see how to modify MoinMoin/userprefs, however, since I don't use python-openid on this machine and I am the only maintainer I simply killed python-openid from the distribution and now all is happy. Thanks again for your help. This is better as I don't use this on this machine. I tried to delete oid.py oidserv.py by renaming them but this didn't help at all.

/!\ One bug per bug report, please file a separate bug report for this problem and move all your stuff there. Also, try to describe it better, some of the above doesn't make sense / it is unclear what you mean. Avoiding mod_python and using mod_wsgi might solve some of your problems (see the help page about modwsgi). Premature end of script headers just means it didn't work and either moin was not executed at all or did not reach the point where it emits the http headers. Check if you have used the new adaptor script we provide under wiki/server/ when upgrading. -- ThomasWaldmann 2008-12-05 05:23:50

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/ChangingUserSettingsCrashes (last edited 2008-12-12 23:58:54 by MichaeCohen)