[Moin-user] Moin

R.Bauer rb.proj at gmail.com
Wed Aug 29 01:29:23 EDT 2012


Am 28.08.2012 09:30, schrieb Kai Jaeger:
> Lars and Eric,
> 
> Thanks for that.
> 
> I am not a Python programmer. However, I always assumed that when ones
> changes a py script then after the next execution there will be either
> a new or an updated pyc script?!

You get only a new pyc file if it can compile. If you broke it  you
likly have an old version.

In case you don't know, you can overwrite an action of the MoinMoin
library by putting it into the data/plugin/action directory of your wiki
instance. Doing so keeps your version also after an upgrade of MoinMoin.


Btw. the log tells what you did wrong, python needs correct indentation.
One level is exactly 4 blanks

> [Tue Aug 28 07:33:37 2012] [error]      return unicode(ret)
> [Tue Aug 28 07:33:37 2012] [error]     ^
> [Tue Aug 28 07:33:37 2012] [error]  IndentationError: unexpected indent



cheers
Reimar


> 
> Anyway, the log file is telling something unexpected:
> -----------------------
> [Tue Aug 28 07:33:37 2012] [error] Traceback (most recent call last):
> [Tue Aug 28 07:33:37 2012] [error]   File
> "C:\\Python26\\lib\\site-packages\\MoinMoin\\wsgiapp.py", line 282, in
> __call__
> [Tue Aug 28 07:33:37 2012] [error]     response = run(context)
> [Tue Aug 28 07:33:37 2012] [error]   File
> "C:\\Python26\\lib\\site-packages\\MoinMoin\\wsgiapp.py", line 88, in
> run
> [Tue Aug 28 07:33:37 2012] [error]     response = dispatch(request,
> context, action_name)
> [Tue Aug 28 07:33:37 2012] [error]   File
> "C:\\Python26\\lib\\site-packages\\MoinMoin\\wsgiapp.py", line 136, in
> dispatch
> [Tue Aug 28 07:33:37 2012] [error]     response =
> handle_action(context, pagename, action_name)
> [Tue Aug 28 07:33:37 2012] [error]   File
> "C:\\Python26\\lib\\site-packages\\MoinMoin\\wsgiapp.py", line 185, in
> handle_action
> [Tue Aug 28 07:33:37 2012] [error]     handler =
> action.getHandler(context, action_name)
> [Tue Aug 28 07:33:37 2012] [error]   File
> "C:\\Python26\\lib\\site-packages\\MoinMoin\\action\\__init__.py",
> line 341, in getHandler
> [Tue Aug 28 07:33:37 2012] [error]     handler =
> wikiutil.importPlugin(cfg, "action", action, identifier)
> [Tue Aug 28 07:33:37 2012] [error]   File
> "C:\\Python26\\lib\\site-packages\\MoinMoin\\wikiutil.py", line 1057,
> in importPlugin
> [Tue Aug 28 07:33:37 2012] [error]     return
> importBuiltinPlugin(kind, name, function)
> [Tue Aug 28 07:33:37 2012] [error]   File
> "C:\\Python26\\lib\\site-packages\\MoinMoin\\wikiutil.py", line 1081,
> in importBuiltinPlugin
> [Tue Aug 28 07:33:37 2012] [error]     return
> importNameFromPlugin(moduleName, function)
> [Tue Aug 28 07:33:37 2012] [error]   File
> "C:\\Python26\\lib\\site-packages\\MoinMoin\\wikiutil.py", line 1094,
> in importNameFromPlugin
> [Tue Aug 28 07:33:37 2012] [error]     module = __import__(moduleName,
> globals(), {}, fromlist)
> [Tue Aug 28 07:33:37 2012] [error]   File
> "C:\\Python26\\lib\\site-packages\\MoinMoin\\action\\newaccount.py",
> line 154
> [Tue Aug 28 07:33:37 2012] [error]      return unicode(ret)
> [Tue Aug 28 07:33:37 2012] [error]     ^
> [Tue Aug 28 07:33:37 2012] [error]  IndentationError: unexpected indent
> [Tue Aug 28 07:33:37 2012] [error] [client 62.255.207.52] mod_wsgi
> (pid=2944): Exception occurred processing WSGI script
> 'D:/Wikis/config/moin.wsgi'., referer:
> http://aplwiki.com/PhraseBook/ArithmeticMean?action=login
> -----------------------
> 
> IndentationError?! I thought I might have added something by accident
> to the file before taking the backup, therefore I restored a
> significantly older backup. Still the newaccount.py from the backup
> equals the current one.
> 
> These are the lines 151-156 from newaccount.py:
> -----------------------
> td.append(html.INPUT(type="submit", name="create",
>                         value=_('Create Profile')))
> 
>                         return unicode(ret)
> 
> def execute(pagename, request):
> -----------------------
> 
> Any ideas?!
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> 






More information about the Moin-user mailing list