On 27 January 2012 17:31, Dr. Trigon dr.trigon@surfeu.ch wrote:
I have a quite confusing situation happening to my bot when trying to access any URL that points to foreign (but mediawiki software) wiki, like this:
pywikibot.getSite().getUrl(foreign_wiki_url, no_hostname = True)
But while doing this the bot seems to log-out since afterwards it is not able to edit any page anymore the "traceback" from the logs is:
Random guess: the bot sends the old site's cookies to the foreign wiki, gets new cookies back and writes those to the user-data file. Then in the next request it tries to use those cookies, which fails.
Check your cookie data file in user-data to confirm.
In any case: why are you trying to use a function that is clearly not made for this purpose, instead of using, say, urlopen, directly, or creating a family file?
Merlijn