Description

We installed Python, started a desktop instance of MoinMoin, and then ran MoinMoin's own sample script from <http://moinmo.in/WikiRpc> to validate proper XML-RPC operation. This validation failed.

Steps to reproduce

  1. Install Python 2.5.4 (or 2.6)
  2. Install MoinMoin (tested with 1.9.2 and 1.8.8)

  3. Enable XML-RPC in the configuration file.
  4. Execute the test script from WikiRpc

Example

errorlog.txt

traceback.txt

I have searched my entire MoinMoin directory and can't find an expaterror.log. The log is not generating.

hmm did you looked into the data dir too?

Yes. Not sure how to sort this out. There is no log to describe the error. I tested the script again and received a ProtocolError. See the following files:

error.txt

traceback_protocol_error.txt

/!\ The expaterror.log is still missing. We need traceback AND expat error log for same crash.

please search for the file "expaterror.log" and attach it too.

Discussion

Oh sorry I have had not carefully looked at the example page you showed. please try it with an auth token and multicall, e.g.

   1 import xmlrpclib
   2 name = "TestUser"
   3 password = "secret"
   4 wikiurl = "http://localhost:8080/"
   5 homewiki = xmlrpclib.ServerProxy(wikiurl + "?action=xmlrpc2",
   6                                  allow_none=True)
   7 auth_token = homewiki.getAuthToken(name, password)
   8 mc = xmlrpclib.MultiCall(homewiki)
   9 mc.applyAuthToken(auth_token)
  10 mc.getAllPages()
  11 result = mc()
  12 print result.results

http://hg.moinmo.in/moin/1.9/rev/28d3928f6e6e

If you need a valid user for xmlrpc calls, please use a multicall and getAuthToken / applyAuthToken (see some samples in MoinMoin/script/...).

I added some more examples on ReimarBauer/xmlrpc.

Why do you think this issue is dependent to the Australian locale?

I'm not sure if it is only applicable to the Australian locale.

Here is the traceback after running the above script and adding my username and password:

This is no traceback, this is output by print. I would have expected a page list.

C:\Python25>"C:\Documents and Settings\wayne.kelly\Desktop\Wikis\moin-1.9.3\XMLR
PC.py"
['HelpOnEditing', 'HelpOnUserHandling', 'HelpContents', 'AbandonedPages', 'HelpO nHeadlines', 'HelpOnAccessControlLists', 'HelpOnXmlPages', 'HelpOnPageDeletion',  'WikiCourse', 'HelpOnAutoAdmin', 'HelpOnProcessingInstructions', 'HelpOnSubscri bing', 'HelpOnSpam', 'HelpOnSlideShows/900 Last but not least: Running your pres entation', 'HelpOnLinking', 'WikiCourse/14 Text styles', 'HelpOnThemes', 'Homepa gePrivatePageTemplate', 'HelpOnAuthentication/ExternalCookie', 'WikiCourse/40 Cr eating more pages', 'PageHits', 'HomepageGroupsTemplate', 'EventStats/UserAgents ', 'HelpOnGroups', 'HelpOnUpdatingPython', 'WikiHomePage', 'WikiCourse/11 Paragr aphs', 'WikiCourse/19 Symbols', 'WantedPages', 'FindPage', 'HelpOnTables', 'Wiki
Course/21 Macros', 'HelpOnImages', 'FrontPage', 'HelpOnSpellCheck', 'HelpOnCreol eSyntax', 'SlideTemplate', 'EditedSystemPages', 'HelpOnConfiguration/EmailSuppor t', 'HomepageReadWritePageTemplate', 'HelpOnMacros/Include', 'LocalSpellingWords ', 'WikiCourse/12 Headlines', 'PermissionDeniedPage', 'XsltVersion', 'HomepageRe adPageTemplate', 'InterWiki', 'HelpTemplate', 'HelpOnCategories', 'HelpOnDrawing s', 'HelpOnFormatting', 'HelpOnConfiguration/UserPreferences', 'MissingPage', 'H elpOnSessions', 'HelpOnPageCreation', 'HelpOnConfiguration', 'WikiSandBox', 'Hel pOnAdministration', 'HelpOnActions', 'HelpOnActions/AttachFile', 'WikiCourse/30 The graphical editor', 'WordIndex', 'HelpOnEditLocks', 'TitleIndex', 'MoinMoin',  'HelpOnMoinCommand/ExportDump', 'MissingHomePage', 'HelpOnComments', 'WikiCours
e/23 Actions', 'RecentChanges', 'HelpOnLists', 'PageSize', 'WikiCourse/02 Findin g information', 'HelpOnMacros/MonthCalendar', 'LanguageSetup', 'SlideShowTemplat e', 'HelpOnSlideShows/000 Introduction', 'HelpOnEditing/SubPages', 'LocalBadCont ent', 'SystemAdmin', 'HelpOnParsers/ReStructuredText/RstPrimer', 'HelpOnConfigur ation/FileAttachments', 'HelpForUsers', 'HelpOnSmileys', 'HelpOnSuperUser', 'Eve ntStats/HitCounts', 'CategoryHomepage', 'WikiCourse/07 The text editor', 'HelpOn MoinCommand', 'WikiCourse/17 External links', 'HelpOnVariables', 'WikiCourse/50 Wiki etiquette', 'HelpOnOpenIDProvider', 'WikiCourse/51 Applications', 'ProjectG roupsTemplate', 'HelpOnSlideShows', 'CategoryTemplate', 'WikiWikiWeb', 'HelpOnCo nfiguration/SecurityPolicy', 'OrphanedPages', 'HelpOnLogin', 'HelpOnSlideShows/1 00 Creating the slides', 'WikiCourse/13 Lists', 'HelpOnMacros/EmbedObject', 'Hel pOnLinking/NotesLinks', 'HelpOnAuthentication', 'Test Page', 'FortuneCookies', '
WikiCourseHandOut', 'HelpOnLanguages', 'HelpOnNotification', 'HelpOnMoinWikiSynt ax', 'WikiCourse/08 Hot Keys', 'WikiCourse/05 User preferences', 'HelpOnSearchin g', 'HelpOnTemplates', 'CategoryCategory', 'HomepageTemplate', 'EventStats', 'He lpOnPackageInstaller', 'WikiName', 'ProjectTemplate', 'HelpOnXapian', 'Introduct ion', 'SystemInfo', 'HelpOnParsers', 'HelpOnNavigation', 'RandomPage', 'WikiCour
se/22 Parsers', 'HelpForBeginners', 'HelpOnSynchronisation', 'HelpOnParsers/ReSt ructuredText', 'HelpOnUserPreferences', 'EventStats/Languages', 'BadContent', 'W
ikiCourse/18 Attachments', 'CamelCase', 'HelpOnAdmonitions', 'HelpOnConfiguratio n/SurgeProtection', 'SlideShowHandOutTemplate', 'HelpOnRules', 'SyncJobTemplate'
, 'HelpOnMacros', 'WikiCourse/20 Dynamic content', 'WikiCourse/03 Staying up to date', 'HelpOnGraphicalEditor', 'WikiCourse/01 What is a MoinMoin wiki?', 'WikiC
ourse/52 Structure in the wiki', 'HelpOnMacros/MailTo', 'HelpOnConfiguration/Sup plementationPage', 'HelpOnDictionaries', 'WikiCourse/16 Wiki internal links', 'W ikiTipOfTheDay', 'WikiCourse/10 Text layout with wiki markup', 'WikiCourse/06 Yo ur own wiki homepage', 'WikiCourse/15 Tables', 'HelpIndex', 'WikiCourse/04 Creat ing a wiki account']

C:\Python25>

You are sure you used an existing account on your wiki with the password of that user? The given user and password was an example only.

OK, got this working using using authentication to run the test. My original problem was that I wasn't able to run a successful test with no authentication on a clean from scratch wiki.

I know and it won't work anymore without authentication for this case because we enhanced security of those calls (see changeset http://hg.moinmo.in/moin/1.9/rev/28d3928f6e6e) The page you mentioned above is a wiki page here for discussions and not an official documentation or help page. Otherwise it would start with HelpOn. I know this is not easy to catch. Someone should have changed it on that page too or may have purged it.

The test I used was:

import xmlrpclib
srcwiki = xmlrpclib.ServerProxy(u"http://ausyd003535w.myob.myobcorp.net/AOInstall/")

allpages = srcwiki.getAllPages()
for pagename in allpages:
    print u"Got %s." % pagename

The result is:

C:\Documents and Settings\wayne.kelly>"C:\Documents and Settings\wayne.kelly\Des
ktop\Wikis\moin-1.9.3\XMLRPC.py"
Traceback (most recent call last):
  File "C:\Documents and Settings\wayne.kelly\Desktop\Wikis\moin-1.9.3\XMLRPC.py
", line 4, in <module>
    allpages = srcwiki.getAllPages()
  File "C:\Python25\lib\xmlrpclib.py", line 1147, in __call__
    return self.__send(self.__name, args)
  File "C:\Python25\lib\xmlrpclib.py", line 1437, in __request
    verbose=self.__verbose
  File "C:\Python25\lib\xmlrpclib.py", line 1201, in request
    return self._parse_response(h.getfile(), sock)
  File "C:\Python25\lib\xmlrpclib.py", line 1335, in _parse_response
    p.feed(response)
  File "C:\Python25\lib\xmlrpclib.py", line 547, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 45, column 2

C:\Documents and Settings\wayne.kelly>

And yes, I still can't find an ExpatError.log. I found an event-log.txt though.

I guess you don't find an ExpatError because there is none. I don't have an idea why you get without multicall and authentication on windows this xml.parsers.expat.ExpatError: mismatched tag: line 45, column 2. Usually we see this if there is an error in the xml data

MoinMoin: MoinMoinBugs/XML-RPC fails under Australian locale (last edited 2010-09-10 22:02:18 by ReimarBauer)