Description

Add <<<TableOfContents>>> on the Page will result in an ImportError cannot import name AS_IS

Steps to reproduce

Example

URL: http://www.dresden-community.de/wiki/StartSeite

Component selection

Details

traceback.html

Workaround

Discussion

Can't reproduce this on my wiki or on this wiki either.

see here:


OK, now i have change my config for testing:

# Version 1.5.8
<Location /wiki>
SetHandler python-program
PythonInterpreter wiki
PythonPath "['/home/d/dresden-community.de/public_html/moin/moin', '/home/d/dresden-community.de/public_html/moin/moin/MoinMoin'] + sys.path"
PythonHandler MoinMoin.request::RequestModPy.run
</Location>

# Version 1.7.0
<Location /wiki2>
SetHandler python-program
PythonInterpreter wiki2
PythonPath "['/home/d/dresden-community.de/moinmoin/moin', '/home/d/dresden-community.de/moinmoin/moin/MoinMoin'] + sys.path"
PythonHandler MoinMoin.request.request_modpython::Request.run
</Location>

http://www.dresden-community.de/wiki

1.5.8

works fine

http://www.dresden-community.de/wiki2

1.7.0

ERROR

Is there an Problem with the PythonHandler command?

There was a 1.6 change that required a change to the PythonHandler statement: see this from docs/CHANGES:

    * Moved / splitted request.py into MoinMoin/request/*.
      Most stuff will be broken, please help fixing it (usually some imports
      will be missing and the adaptor script will need a change maybe):
      Tested successfully: CGI, CLI, STANDALONE, FCGI, TWISTED

Also, HelpOnInstalling/ApacheWithModPython for 1.7.0 shows the PythonHandler statement just as you have coded yours above.

  <Directory "/var/www/moin/testwiki">
    # Modpy stuff
    AddHandler python-program .py
    # Add the path to the wiki directory, where
    # moinmodpy.py and wikiconfig.py are located.
    PythonPath "['/var/www/moin/mywiki'] + sys.path"
    PythonHandler MoinMoin.request.request_modpython::Request.run
  </Directory>

You may want to consider moving to mod_WSGI -- see HelpOnInstalling/ApacheWithModWSGI. It is pretty easy. I think there is another unresolved problem with mod_python when uploading files still open.


THX RogerHaase for your correctly solution! Thanks to all other Supporters helped me.

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/TableOfContentsImportError (last edited 2008-07-02 09:20:12 by p578b30aa)