13 Jul 2010 17:06
Problem with mwclient page.save and large text files
Sal976 <salvatore.loguercio <at> googlemail.com>
2010-07-13 15:06:19 GMT
2010-07-13 15:06:19 GMT
Hi, I am using mwclient 0.6.4 (r93) to import some Wiki pages from en.wikipedia to another wiki installation (presumably running Mediawiki 1.15). Everything works fine, except when I try to import 'big' pages, e.g.: http://en.wikipedia.org/wiki/Grb2 content= Mediawiki text file to be imported (111579 characters in this case) When I try to write this page (or pages of similar size), I get the following error: page = site.Pages['Grb2'] page.save(content) Traceback: File "<stdin>", line 1, in <module> File "/usr/lib64/python2.6/site-packages/mwclient/page.py", line 142, in save result = do_edit() File "/usr/lib64/python2.6/site-packages/mwclient/page.py", line 137, in do_edit **data) File "/usr/lib64/python2.6/site-packages/mwclient/client.py", line 165, in api info = self.raw_api(action, **kwargs) File "/usr/lib64/python2.6/site-packages/mwclient/client.py", line 250, in(Continue reading)
But bots don't usually log out, so
that isn't an issue, they stay logged in for years.
Might be okay.
On Wed, Jul 14, 2010 at 2:55 PM, Roan Kattouw <roan.kattouw <at> gmail.com> wrote:
> 2010/7/14 Robert Ullmann <rlullmann <at> gmail.com>:
>> Hi,
>>
>> I haven't been able to figure this out from the doc ...
>>
>> Can I log in a user (bot) from more than one place (IP address) at the
>> same time? I have an impending need to run Interwicket from more than
>> one place, as the primary will be unavailable at times. Is logging in
>> the other system going to log out the first, or some such? any bad
>> effects?
>>
> I believe it will cause such an effect, yes. AFAIK the only reliable
> way to be logged in in two places at once is to log in in one place
> and transfer the information in the login cookies to the second place.
>
> I think you should just try it and see what happens; worst case you
> can detect you've been logged out and log in again, although that
RSS Feed