[Pywikipedia-l] I can get pages from a wiki, yet I can write to them

Carlos Thompson chlewey at cable.net.co
Fri Dec 28 15:47:18 UTC 2007


I am running a MediaWiki wiki, and I am attempting to use pywikipedia to 
handle some of the administrative tasks.

I have defined the new family, edited the user_config.py file, and I have 
used the bot to preload some content.  However I have a problem: the bot 
cannot get a page from the server.

As a sample test (run from Python IDE):

  import wikipedia
  site = wikipedia.getSite()
  page = wikipedia.Page(site,"Test")
  page.put("This is a test")

And I have a new page (or a reedited page) with the provided content.  This 
is okay.

However:
  page = wikipedia.Page(site,"Test")
  print page.get()

returns a NoPage error message.

I have test against Wikipedia using the same installation and I can read the 
articles without any problems.

I suspect that I might have a problem in either the definition of the 
family, or the configuration of the wiki.  I had already defined families 
for Wikia and for Wikiversity in Spanish without any problems (but I might 
have missed something).

On my site, I have some rewrite rules, however a request such as 
/index.php?title=Test&action=raw works fine.  (As does /Test?action=raw  and 
/w-raw/Test ).  The wiki is also using a skin designed for that site.

Thank you for your advise.

-- Carlos Th 




More information about the Pywikipedia-l mailing list