Sorry, I am unable to duplicate your problem. I'm not used to your method of invoking idle, but if I try it my way (open the file for editing in idle, then typing in in the Python Shell) I get:
import wikipedia site = wikipedia.Site('vo','wikipedia') pad = wikipedia.Page(site, 'Aalst') txt = pad.get() txt
u"[[Magod:MnpAalstLocation.png|right|200px]]\n'''Aalst''' binon zif in provin: [[Oost-Vlaanderen]], in [[Belg\xe4n]].\n \n\nS\xfcrfat ela Aalst binon 78,12 km\xb2.\n\n\nAalst labon bel\xf6danis 77 508 (2006).\n\n\n{{ZifsOostVlaanderenBelg\xe4n}}\n\n[[Category:Zifs]]\n[[Category:Zifs in Belg\xe4n]]\n\n[[bg:\u0410\u0430\u043b\u0441\u0442]]\n[[cs:Aalst]]\n[[de:Aalst]]\n[[en:Aalst, Belgium]]\n[[eo:Aalst]]\n[[es:Aalst]]\n[[fi:Aalst]]\n[[fr:Alost]]\n[[gl:Aalst]]\n[[it:Aalst]]\n[[ja:\u30a2\u30fc\u30eb\u30b9\u30c8]]\n[[la:Alostum]]\n[[li:Aals (gemeinte)]]\n[[nl:Aalst (Oost-Vlaanderen)]]\n[[no:Aalst]]\n[[pl:Aalst]]\n[[pt:Aalst]]\n[[sk:Aalst]]\n[[sv:Aalst]]"
So it seems to be working without problems for me.
What I do see is that for some reason or another, your bot believes that the page does not exist. But I can't think of what that reason might be. Sorry.
Andre
2007/5/16, Meira, S. S.Meira@let.leidenuniv.nl:
Thanks for the quick answers!
You could post them on this list, or put them on meta. There are several free upload services, I think http://www.speedyshare.com/ https://webmail.wsd.leidenuniv.nl/exchweb/bin/redir.asp?URL=http://www.speedyshare.com/
supports archive files.
Do you mean that I could gzip the files and send them directly to this list? I think they'll be about 2-3MB; is that too much? Or do you mean I should smply send a message to the list after I run interwiki to tell people there are new warnfiles? (I suppose the easiest solution is to upload them to speedyshare, as Daniel suggested, and just post the address to this list, and also to meta -- I assume you mean the link in the interwiki.py page?
I would need to know exactly what you type (try to get something as
simple as possible that causes the error), then I can see what goes wrong.
OK, here is what I just did.
I loaded IDLE in my Windows PC (from the Start menu).
I try to "import wikipedia". IDLE says:
"Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import wikipedia ImportError: No module named wikipedia
Apparently it is not looking in the right folder, since it didn't find wikipedia.
- I then loaded wikipedia (Open from file menu) and ran it with "Run Module" (F5) -- I have very little experience, and this seemed to have the desired effect of pointing IDLE to the right folder. IDLE answered:
"======== RESTART ========
Checked for running processes. 1 processes currently running, including the current process. Checked for running processes. 2 processes currently running, inlcuding the current process."
Now I did "import wikipedia", and it worked.
I wrote: site = wikipedia.Site('vo', 'wikipedia'). No error messages; print site yields wikipedia:vo
I wrote: pad = wikipedia.Page(site, 'Aalst') (Aalst being an extant page on the Volapük wikipedia). No error messages; print pad yields [[Aalst]].
Now the problem. I try: txt = pad.get(). It begins well, with: Geting page [[Aalst]] Checked for running processes. 1 processes currently running, including the current process.
Then, after 5-6 seconds, I get:
"Traceback (most recent call last): File "<pyshell#8>", line 1, in <module> txt = pad.get() File "C:\Sérgio\Python2.5\pywikipedia\wikipedia.py", line 491, in get self._contents, self._isWatched, self.editRestriction = self.getEditPage(get_redirect = get_redirect, \ throttle = throttle, sysop = sysop) File "C:\Sérgio\Python2.5\pywikipedia\wikipedia.py", line 584, in getEditPage raise NoPage(self.site(), self.aslink(forceInterwiki = True)) NoPage: (wikipedia.vo, u'[[vo:Aalst]]')
.
Now, just out of curiosity, I try: 8. pad.put('aaaa'). It says:
Geting a page to check if we're logged in on wikipedia:vo Creating page [[vo:Aalst]]
And then, I get an error message:
Traceback (most recent call last): File "<pyshell#9>", line 1, in <module> pad.put('aaaa') File "C:\Sérgio\Python2.5\pywikipedia\wikipedia.py", line 948, in put return self.putPage(newtext, comment, watchArticle, minorEdit, newPage, self.site().getToken(sysop = sysop), sysop = sysop) File "C:\Sérgio\Python2.5\pywikipedia\wikipedia.py", line 1039, in putPage raise EditConflict(u'An edit conflict has occured.') EditConflict: An edit conflict has occured.
Hmm. I try with a different page: 9. pad2 = wikipedia.Page(site, 'Aaa') (Aaa is a non-existant page; now print pad2 yields [[Aaa]]). 10. pad2.put('aaaa'). Answer:
Getting page [[Aaa]] Checked for running processes. 1 processes currently running, including the current process. Creating page [[vo:Aaa]] (302, 'Moved Temporarily', u' ')
When I check the Volapük wikipedia, the page "Aaa" is there, with text "aaaaa". I delete it, since it's nonsensical.
So: put() worked, but not get(). Can you help me?
Thanks in advance,
Sérgio
Wikibots-l mailing list Wikibots-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikibots-l