[Moin-user] MoinMoin and Python 2.2

Bruce.Durling at equifax.com Bruce.Durling at equifax.com
Thu Jan 3 00:31:04 EST 2002

Hello all,

I've been using MoinMoin 0.8 for a while now with Python 2.0 on Solaris
very happily. Do to some insourcing (I  love that word). I have to move it
to a new box. That box has Python 2.2 on it. I'd like to upgrade to
MoinMoin 0.10 and Python 2.2, but I'm getting some exceptions thrown.

I've been trying different versions of MoinMoin to see if that would solve
the problem. Here is the traceback with a combination of MoinMoin 0.8 and
Python 2.2

Any help would be appreciated. Do I have to go back to Python 2.1 or 2.0?

Should I raise a bug in the sf.net bug tracker or is this list a better
place to post it?

I've had a look at the python in there and I have to admit that I get lost
in some of the regular expressions. I'll have more of a look though.


Here come the tracebacks with the different combinations.

Here is the traceback with a combination of MoinMoin 0.8 and Python 2.2

Traceback (most recent call last):
  File "/opt/apps/ntg/support/moinmoin/MoinMoin/cgimain.py", line 129, in
  File "/opt/apps/ntg/support/moinmoin/MoinMoin/Page.py", line 246, in
    Parser(body).format(self.formatter, form)
  File "/opt/apps/ntg/support/moinmoin/MoinMoin/parser/wiki.py", line 465,
in format
    sys.stdout.write(re.sub(scan_re, self.replace, line + " "))
  File "/opt/apps/ntg/devel/lib/python2.2/sre.py", line 143, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "/opt/apps/ntg/support/moinmoin/MoinMoin/parser/wiki.py", line 386,
in replace
    return apply(getattr(self, '_' + type + '_repl'), (hit,))
AttributeError: Parser instance has no attribute '_hmarker_repl'

With MoinMoin 0.10 and Python 2.2 test.cgi gives me the following:

MoinMoin CGI Diagnosis

Package "MoinMoin" sucessfully imported.

Traceback (innermost last):
  File "/opt/apps/ntg/support/moinmoin/cgi-bin/test.cgi", line 42, in ?
   File "/opt/apps/ntg/support/moinmoin/cgi-bin/test.cgi", line 32, in run
   File "/opt/apps/ntg/support/moinmoin/MoinMoin/cgimain.py", line 22, in
    from MoinMoin import config, util, version, editlog
   File "/opt/apps/ntg/support/moinmoin/MoinMoin/editlog.py", line 16, in ?
    from MoinMoin.Page import Page
   File "/opt/apps/ntg/support/moinmoin/MoinMoin/Page.py", line 13, in ?
    from MoinMoin.cgimain import request
 ImportError: cannot import name request

MoinMoin 0.10 and Python 2.2 looking at the WikiSandBox gives the

                                                                Python 2.2 

A problem occurred while running a Python script. Here is the sequence of
function calls leading up to the error, with the most recent (innermost)
call last.

 /opt/apps/ntg/support/moinmoin/MoinMoin/cgimain.py in run(properties={})   

  165         try:
  166             from MoinMoin.support import cgitb
   167             cgitb.handler()                                          

       cgitb = <module 'MoinMoin.support.cgitb' from
'/opt/apps/ntg/support/moinmoin/MoinMoin/support/cgitb.py'>, handler =
  168         except:
  169             cgi.print_exception()

 /opt/apps/ntg/support/moinmoin/MoinMoin/Page.py in send_page(self          
 =<MoinMoin.Page.Page instance at 0x201ab8>, form=FieldStorage(None, None,  
 []), msg='', **keywords={})                                                

  281         else:
  282             # parse the text and send the page content
   283             Parser(body).format(self.formatter, form)                

       Parser = <class MoinMoin.parser.wiki.Parser at 0x212120>, body
= "Please feel free to experiment here...\n\n'''Ti...''' more interesting
than the First Section.''\n", global format = undefined, self
= <MoinMoin.Page.Page instance at 0x201ab8>, global formatter = undefined,
form = FieldStorage(None, None, [])
  285         # end document output

 /opt/apps/ntg/support/moinmoin/MoinMoin/parser/wiki.py in format (self     
 =<MoinMoin.parser.wiki.Parser instance at 0x178b80>, formatter             
 =<MoinMoin.formatter.text_html.Formatter instance at 0x2024d0>,            
 form=FieldStorage(None, None, []))                                         

  479                 sys.stdout.write(self.highlight_scan(scan_re, line
+ " "))
  480             else:
   481                 sys.stdout.write(re.sub(scan_re, self.replace, line  
 + " "))                                                                    

       global sys = <module 'sys' (built-in)>, global stdout = undefined,
global write = undefined, global re = <module 're' from
'/opt/apps/ntg/devel/lib/python2.2/re.pyc'>, global sub = undefined,
scan_re = <_sre.SRE_Pattern object at 0x2334a8>, self
= <MoinMoin.parser.wiki.Parser instance at 0x178b80>, global replace =
undefined, line = '== The First Section =='
  483             if self.in_pre:

 /opt/apps/ntg/devel/lib/python2.2/sre.py in sub (pattern=<_sre.SRE_Pattern 
 object at 0x2334a8>, repl=<bound method Parser.replace of                  
 <MoinMoin.parser.wiki.Parser instance at 0x178b80>>, string='== The First  
 Section == ', count=0)                                                     

  141     non-overlapping occurrences of the pattern in string by the
  142     replacement repl"""
   143     return _compile(pattern, 0).sub(repl, string, count)             

       global _compile = <function _compile at 0x1c9670>, pattern =
<_sre.SRE_Pattern object at 0x2334a8>, global sub = <function sub at
0x1b6de0>, repl = <bound method Parser.replace of
<MoinMoin.parser.wiki.Parser instance at 0x178b80>>, string = '== The First
Section == ', count = 0
  145 def subn(pattern, repl, string, count=0):

 /opt/apps/ntg/support/moinmoin/MoinMoin/parser/wiki.py in replace(self     
 =<MoinMoin.parser.wiki.Parser instance at 0x178b80>, match=<_sre.SRE_Match 
 object at 0x220820>)                                                       

  394                     return self.highlight_text(hit)
  395                 else:
   396                     return apply(getattr(self, '_' + type + '        
 _repl'), (hit,))                                                           

       global apply = undefined, global getattr = undefined, self
= <MoinMoin.parser.wiki.Parser instance at 0x178b80>, type = 'hmarker', hit
= '=='
  397         else:
  398             import pprint

AttributeError: Parser instance has no attribute '_hmarker_repl'
      __doc__ = 'Attribute not found.'
      __getitem__ = <bound method AttributeError.__getitem__ of
<exceptions.AttributeError instance at 0x21ae48>>
      __init__ = <bound method AttributeError.__init__ of
<exceptions.AttributeError instance at 0x21ae48>>
      __module__ = 'exceptions'
      __str__ = <bound method AttributeError.__str__ of
<exceptions.AttributeError instance at 0x21ae48>>
      args = ("Parser instance has no attribute '_hmarker_repl'",)

This message contains information from Equifax, Inc. which may be
confidential and privileged.  If you are not an intended recipient, please
refrain from any disclosure, copying, distribution or use of this
information and note that such actions are prohibited.  If you have
received this transmission in error, please notify by e-mail
postmaster at equifax.com.

More information about the Moin-user mailing list