When using replace.py without the -always parameter, I've found a serious problem: If I accidentally interrupt the operation,* I get a message like the following, "Waiting for xx pages to be put. Estimated time remaining: xxxxx" - however, it fails to make the changes, even when I leave it a long time. If I've made a lot of changes, this is a very big problem. The full output is shown below.
*I wanted to copy a page name to edit manually, and reflexively used ctrl+C to copy, but of course this is a KeyboardInterrupt. It's very ingrained habit, and realistically I'm likely to make the same mistake in future.
--
Do you want to accept these changes? ([y]es, [N]o, [e]dit, open in [b]rowser, [a]ll, [q]uit) Traceback (most recent call last): File "/home/cwg/pwb/pagegenerators.py", line 763, in __iter__ yield loaded_page GeneratorExit
Traceback (most recent call last): File "replace.py", line 694, in <module> main() File "replace.py", line 690, in main bot.run() File "replace.py", line 387, in run ['y', 'N', 'e', 'b', 'a', 'q'], 'N') File "/home/cwg/pwb/wikipedia.py", line 6228, in inputChoice data = ui.inputChoice(question, answers, hotkeys, default).lower() File "/home/cwg/pwb/userinterfaces/terminal_interface.py", line 261, in inputChoice answer = self.input(prompt) File "/home/cwg/pwb/userinterfaces/terminal_interface.py", line 238, in input text = raw_input() KeyboardInterrupt Waiting for 67 pages to be put. Estimated time remaining: 0:11:10
On Sun, Jun 29, 2008 at 7:58 PM, Chris Watkins chriswaterguy@appropedia.org wrote:
When using replace.py without the -always parameter, I've found a serious problem: If I accidentally interrupt the operation,* I get a message like the following, "Waiting for xx pages to be put. Estimated time remaining: xxxxx" - however, it fails to make the changes, even when I leave it a long time.
a little more info - the error message it gives at this point is:
maximum recursion depth exceeded in cmp WARNING: Could not open ' http://www.appropedia.org/w/api.php?action=query&meta=userinfo&uipro...'. Maybe the server or your connection is down. Retrying in xx minutes...
Chris
If I've made a lot of changes, this is a very big problem. The full output
is shown below.
*I wanted to copy a page name to edit manually, and reflexively used ctrl+C to copy, but of course this is a KeyboardInterrupt. It's very ingrained habit, and realistically I'm likely to make the same mistake in future.
--
Do you want to accept these changes? ([y]es, [N]o, [e]dit, open in [b]rowser, [a]ll, [q]uit) Traceback (most recent call last): File "/home/cwg/pwb/pagegenerators.py", line 763, in __iter__ yield loaded_page GeneratorExit
Traceback (most recent call last): File "replace.py", line 694, in <module> main() File "replace.py", line 690, in main bot.run() File "replace.py", line 387, in run ['y', 'N', 'e', 'b', 'a', 'q'], 'N') File "/home/cwg/pwb/wikipedia.py", line 6228, in inputChoice data = ui.inputChoice(question, answers, hotkeys, default).lower() File "/home/cwg/pwb/userinterfaces/terminal_interface.py", line 261, in inputChoice answer = self.input(prompt) File "/home/cwg/pwb/userinterfaces/terminal_interface.py", line 238, in input text = raw_input() KeyboardInterrupt Waiting for 67 pages to be put. Estimated time remaining: 0:11:10
-- Chris Watkins (a.k.a. Chriswaterguy)
Appropedia.org - Sharing knowledge to build rich, sustainable lives.
Blog: chriswaterguy.livejournal.com/
Buying at Amazon, eBay etc? Start at http://appropedia.maatiam.com and a percentage of your purchase supports Appropedia - at no extra cost.
Where men are the most sure and arrogant, they are commonly the most mistaken, and have there given reins to passion, without that proper deliberation and suspense, which can alone secure them from the grossest absurdities. -- David Hume
On Sun, Jun 29, 2008 at 8:01 PM, Chris Watkins chriswaterguy@appropedia.org wrote:
On Sun, Jun 29, 2008 at 7:58 PM, Chris Watkins chriswaterguy@appropedia.org wrote:
When using replace.py without the -always parameter, I've found a serious problem: If I accidentally interrupt the operation,* I get a message like the following, "Waiting for xx pages to be put. Estimated time remaining: xxxxx" - however, it fails to make the changes, even when I leave it a long time.
a little more info - the error message it gives at this point is:
maximum recursion depth exceeded in cmp WARNING: Could not open 'http://www.appropedia.org/w/api.php?action=query&meta=userinfo&uipro...'. Maybe the server or your connection is down. Retrying in xx minutes...
Chris
That is because this wiki is configured such that the wiki resides in the root directory, which is bad habbit. Also the Pywikipedia framework appears to rely for some critical stuff on the api which is not good either.
Bryan
On Sun, Jun 29, 2008 at 10:46 PM, Bryan Tong Minh bryan.tongminh@gmail.com wrote:
On Sun, Jun 29, 2008 at 8:01 PM, Chris Watkins chriswaterguy@appropedia.org wrote:
On Sun, Jun 29, 2008 at 7:58 PM, Chris Watkins chriswaterguy@appropedia.org wrote:
When using replace.py without the -always parameter, I've found a serious problem: If I accidentally interrupt the operation,* I get a message like the following, "Waiting for xx pages to be put. Estimated time remaining: xxxxx" - however, it fails to make the changes, even when I leave it a long time.
a little more info - the error message it gives at this point is:
maximum recursion depth exceeded in cmp WARNING: Could not open 'http://www.appropedia.org/w/api.php?action=query&meta=userinfo&uipro...'. Maybe the server or your connection is down. Retrying in xx minutes...
Chris
That is because this wiki is configured such that the wiki resides in the root directory, which is bad habbit. Also the Pywikipedia framework appears to rely for some critical stuff on the api which is not good either.
Bryan
After looking in the code, you should add:
def api_address(self): raise NotImplementedError
in your family file.
We should probably try to detect blocks on non api wikis as well.
a little more info - the error message it gives at this point is:
maximum recursion depth exceeded in cmp WARNING: Could not open '
http://www.appropedia.org/w/api.php?action=query&meta=userinfo&uipro... '.
Maybe the server or your connection is down. Retrying in xx minutes...
Chris
That is because this wiki is configured such that the wiki resides in the root directory, which is bad habbit.
yes - it was configured for nice simple urls. I don't have a good understanding of this issue.
So is this error something I just have to live with (I really hope not!) or is there a way around it?
Thanks, Chris
Also the Pywikipedia framework appears to rely for some critical stuff on the api which is not good either.
Bryan
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Sorry, only just saw that you'd already replied with a solution. Thanks Bryan - I'm trying it out.
Chris
Bryan wrote:
After looking in the code, you should add:
def api_address(self): raise NotImplementedError
in your family file.
We should probably try to detect blocks on non api wikis as well.
On Sun, Jun 29, 2008 at 10:59 PM, Chris Watkins < chriswaterguy@appropedia.org> wrote:
yes - it was configured for nice simple urls. I don't have a good understanding of this issue.
So is this error something I just have to live with (I really hope not!) or is there a way around it?
Thanks, Chris
After I changed the family file as suggested, it broke badly. I cannot successfully run a bot and save changes - this is even if I don't hit ctrl+C, of course! :)
I could reinstall the whole thing, go back and redo all the things I've forgotten when I first installed Pywikipedia, but is there a simpler way? I tried packing the latest nightly package into the directory, replacing existing files, but it's still broken.
Often it's a server error, but the site is running fine. Other commands access the server, but they all break when it comes to trying to put the changes. (Yes, I run "python login.py" before i start.)
Thanks in advance, and for all the help so far.
Chris
E.g. 1: using a file list and the "-always" parameter:
$ python replace.py -excepttext:"[[appropriate technology organizations" -excepttext:"appropriate technology organizations]]" "appropriate technology organizations" "[[appropriate technology organizations]]" -always -file:files1.txt
This gives:
No changes were necessary in [[Ashden Awards]] No changes were necessary in [[Category:Microhydro]] <snip>
Clay Brick and Tile Moulding Equipment 2 <<<
- The activities of BASIN are divided between four leading European, non-profit appropriate technology organizations, each of which covers a separate specialized subject area, in order to provide more qualified expertise with greater efficiency. + The activities of BASIN are divided between four leading European, non-profit [[appropriate technology organizations]], each of which covers a separate specialized subject area, in order to provide more qualified expertise with greater efficiency.
Then it stops for a while, before giving this message:
maximum recursion depth exceeded in cmp WARNING: Could not open ' http://www.appropedia.org/w/api.php?action=query&meta=userinfo&uipro...'. Maybe the server or your connection is down. Retrying in 1 minutes... maximum recursion depth exceeded in cmp WARNING: Could not open ' http://www.appropedia.org/w/api.php?action=query&meta=userinfo&uipro...'. Maybe the server or your connection is down. Retrying in 2 minutes...
...and so on.
E.g. 2: using replace.py with the -xml parameter and manually selecting which changes to accept, I get a message like this:
Waiting for 3 pages to be put. Estimated time remaining: 0:00:30 There are 3 pages remaining in the queue. Estimated time remaining: 0:00:30
But it doesn't actually make any changes - it either hangs there, or say it can't find the server, and keeps retrying until I stop it (after several hours in one case)
Error messages occur during the running of replace.py as well, but don't actually stop it running.
E.g. 3: redirect.py doesn't work either - the second part of the error about the server being down is the same as above:
$ python redirect.py double -always Checked for running processes. 1 processes currently running, including the current process. Retrieving special page... maximum recursion depth exceeded in cmp WARNING: Could not open ' http://www.appropedia.org/w/api.php?action=query&meta=userinfo&uipro...'. Maybe the server or your connection is down. Retrying in 1 minutes...
On Sun, Jun 29, 2008 at 11:07 PM, Chris Watkins < chriswaterguy@appropedia.org> wrote:
Sorry, only just saw that you'd already replied with a solution. Thanks Bryan - I'm trying it out.
Chris
Bryan wrote:
After looking in the code, you should add:
def api_address(self): raise NotImplementedError
in your family file.
We should probably try to detect blocks on non api wikis as well.
On Sun, Jun 29, 2008 at 10:59 PM, Chris Watkins < chriswaterguy@appropedia.org> wrote:
yes - it was configured for nice simple urls. I don't have a good understanding of this issue.
So is this error something I just have to live with (I really hope not!) or is there a way around it?
Thanks, Chris
-- Chris Watkins (a.k.a. Chriswaterguy)
Appropedia.org - Sharing knowledge to build rich, sustainable lives.
Blog: chriswaterguy.livejournal.com/
Buying at Amazon, eBay etc? Start at http://appropedia.maatiam.com and a percentage of your purchase supports Appropedia - at no extra cost.
Where men are the most sure and arrogant, they are commonly the most mistaken, and have there given reins to passion, without that proper deliberation and suspense, which can alone secure them from the grossest absurdities. -- David Hume