First sorry if you did get my mail earlier and responded to it. I didn't receive any reply because my account was unconfirmed.
I just confirmed y email and got a welcome message.
So I m sorry to ask twice Here is my problem:
Iist glad to meet you all;
I am looking for help to set up a bot for my own mediawiki, I have python 2.6 installed. Here is my user-config.py http://pastebin.com/AtFUHPeq In families folder I created a file ncdb_family.py, content: http://pastebin.com/0KW4EVBY I edited config.py http://pastebin.com/Zz3hrbHX I edited family.py: http://pastebin.com/0pEwKR9h And finally I edited the wikipedia.py http://pastebin.com/gEPEqNZs I tried to follow the tutorial but I still run in some trouble when I use login.py or replace.py
D:\Development\python>python.exe D:\development\pymw\login.py Traceback (most recent call last): File "D:\development\pymw\login.py", line 58, in <module> import re, os, query File "d:\development\pymw\query.py", line 28, in <module> import wikipedia, time File "d:\development\pymw\wikipedia.py", line 4618, in <module> class Site(object): File "d:\development\pymw\wikipedia.py", line 4789, in Site def __init__(self, code, fam=ncdb, user=root, persistent_http = False ): NameError: name 'ncdb' is not defined
D:\Development\python>python.exe D:\development\pymw\replace.py Traceback (most recent call last): File "D:\development\pymw\replace.py", line 147, in <module> import wikipedia as pywikibot File "d:\development\pymw\wikipedia.py", line 4618, in <module> class Site(object): File "d:\development\pymw\wikipedia.py", line 4789, in Site def __init__(self, code, fam=ncdb, user=root, persistent_http = False ): NameError: name 'ncdb' is not defined
Could you please help me setting my python bot :)
Thanks
2010/12/23 CobraSA CobraSA@live.com
First sorry if you did get my mail earlier and responded to it. I didn't receive any reply because my account was unconfirmed.
Welcome here. We have not got any earlier mail (you may chack earlier mailing in the archive, which is in the footer of letters).
Here is my user-config.py http://pastebin.com/AtFUHPeq
Seems to be OK at first sight.
I edited config.py http://pastebin.com/Zz3hrbHX And finally I edited the wikipedia.py http://pastebin.com/gEPEqNZs
These to are very long and hopeless to find the difference. Please write the modified lines only. Normally these should not be changed at all for basic use. That's what user-config.py and families are for.
Hi CobraSA,
On 23 December 2010 08:40, CobraSA CobraSA@live.com wrote: (in reverse order)
I edited config.py http://pastebin.com/Zz3hrbHX I edited family.py: http://pastebin.com/0pEwKR9h And finally I edited the wikipedia.py http://pastebin.com/gEPEqNZs
Why did you edit these? This is generally unnecessary - anything in config.py can be set in user-config.py, and anything in family.py can be set in ncdb_family.py. Wikipedia.py should be modular enough to 'just work'.
Here is my user-config.py http://pastebin.com/AtFUHPeq In families folder I created a file ncdb_family.py, content: http://pastebin.com/0KW4EVBY
These look OK on first sight.
I tried to follow the tutorial but I still run in some trouble when I use File "d:\development\pymw\wikipedia.py", line 4789, in Site def __init__(self, code, fam=ncdb, user=root, persistent_http = False ):
You did not define variables called ncdb or root. Did you mean fam="ncdb" and user="root"?
However, I would suggest using the original files. It is very hard for other people to help you when files such as wikipedia.py, family.py and config.py are changed. Try to only change things in user-config.py and ncdb_family.py - the bot will then probably run fine.
Best regards, Merlijn
I have redownloaded those file and I have eve more errors now:
D:\Development\python>python.exe D:\development\pymw\login.py Traceback (most recent call last): File "D:\development\pymw\login.py", line 58, in <module> import re, os, query File "d:\development\pymw\query.py", line 28, in <module> import wikipedia, time File "D:\development\pymw\wikipedia.py", line 7600, in <module> getSite(noLogin=True) File "D:\development\pymw\wikipedia.py", line 7450, in getSite persistent_http=persistent_http) File "D:\development\pymw\wikipedia.py", line 4792, in __init__ self.family = Family(fam, fatal = False) File "D:\development\pymw\wikipedia.py", line 4600, in Family myfamily = __import__('%s_family' % fam) File "D:\development\pymw\families\ncdb_family.py", line 152 def version(self, code): ^ IndentationError: expected an indented block
Please help me fixing the errors one by one. :)
Regards my friends Cobra
-----Message d'origine----- From: Merlijn van Deen Sent: Thursday, December 23, 2010 12:42 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
Hi CobraSA,
On 23 December 2010 08:40, CobraSA CobraSA@live.com wrote: (in reverse order)
I edited config.py http://pastebin.com/Zz3hrbHX I edited family.py: http://pastebin.com/0pEwKR9h And finally I edited the wikipedia.py http://pastebin.com/gEPEqNZs
Why did you edit these? This is generally unnecessary - anything in config.py can be set in user-config.py, and anything in family.py can be set in ncdb_family.py. Wikipedia.py should be modular enough to 'just work'.
Here is my user-config.py http://pastebin.com/AtFUHPeq In families folder I created a file ncdb_family.py, content: http://pastebin.com/0KW4EVBY
These look OK on first sight.
I tried to follow the tutorial but I still run in some trouble when I
use File "d:\development\pymw\wikipedia.py", line 4789, in Site def __init__(self, code, fam=ncdb, user=root, persistent_http = False ):
You did not define variables called ncdb or root. Did you mean fam="ncdb" and user="root"?
However, I would suggest using the original files. It is very hard for other people to help you when files such as wikipedia.py, family.py and config.py are changed. Try to only change things in user-config.py and ncdb_family.py - the bot will then probably run fine.
Best regards, Merlijn
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
2010/12/23 CobraSA CobraSA@live.com
I have redownloaded those file and I have eve more errors now:
No, don't panic, this is ONE error, and the queue of program lines through which the interpreter reached the error. Always begin to read at the bottom.
File "D:\development\pymw\families\ncdb_family.py", line 152 def version(self, code): ^ IndentationError: expected an indented block
This is an indentation error at the given line. :-) Indentation is a basic thing in Python. what belongs to a block, must be intented to the head of the block, and the same level instructions within the same block MUST be each under the other. Basically, a program ine following a line ending with ":" character has to be indented to the next indentation level (Python habit is 4 spaces for each level, and never mix tabs and spaces in the same file).
File "D:\development\pymw\families\ncdb_family.py", line 152
def version(self, code):
^
IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
1. def apipath(self, code): 2. # raise NotImplementedError, "%s wiki family does not support api.php" % self.name 3. # return '%s/api.php' % self.scriptpath(code) 4. 5. # Which version of MediaWiki is used? REQUIRED 6. def version(self, code): 7. # Replace with the actual version being run on your wiki 8. return '1.16.0'
For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
Hi
I have changed ‘1.16.0’ for ‘pass’ or for ‘’ And still same error line 152.
Regards Cobra
From: Bináris Sent: Thursday, December 23, 2010 2:35 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
File "D:\development\pymw\families\ncdb_family.py", line 152
def version(self, code): ^ IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
1.. def apipath(self, code): 2.. # raise NotImplementedError, "%s wiki family does not support api.php" % self.name 3.. # return '%s/api.php' % self.scriptpath(code) 4.. 5.. # Which version of MediaWiki is used? REQUIRED 6.. def version(self, code): 7.. # Replace with the actual version being run on your wiki 8.. return '1.16.0' For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
Try using generate_family_files.py that should ensure that you dont have these problems
On Thu, Dec 23, 2010 at 9:43 AM, CobraSA CobraSA@live.com wrote:
Hi
I have changed ‘1.16.0’ for ‘pass’ or for ‘’ And still same error line 152. [image: Triste]
Regards Cobra
*From:* Bináris wikiposta@gmail.com *Sent:* Thursday, December 23, 2010 2:35 PM *To:* Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org *Subject:* Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
File "D:\development\pymw\families\ncdb_family.py", line 152
def version(self, code):
^
IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
def apipath(self, code):
# raise NotImplementedError, "%s wiki family does not
support api.php" % self.name 3. # return '%s/api.php' % self.scriptpath(code) 4. 5. # Which version of MediaWiki is used? REQUIRED 6. def version(self, code): 7. # Replace with the actual version being run on your wiki 8. return '1.16.0'
For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
-- Bináris
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
D:\Development\python>python.exe D:\development\pymw\generate_family_file.py Traceback (most recent call last): File "D:\development\pymw\generate_family_file.py", line 41, in <module> import family File "D:\development\pymw\family.py", line 10, in <module> import config File "D:\development\pymw\config.py", line 485, in <module> for _filename in os.listdir(os.path.join(_base_dir, 'families')): WindowsError: [Error 3] Le chemin dÆaccÞs spÚcifiÚ est introuvable: '.\families /*.*'
From: John Doe Sent: Thursday, December 23, 2010 3:58 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
Try using generate_family_files.py that should ensure that you dont have these problems
On Thu, Dec 23, 2010 at 9:43 AM, CobraSA CobraSA@live.com wrote:
Hi
I have changed ‘1.16.0’ for ‘pass’ or for ‘’ And still same error line 152.
Regards Cobra
From: Bináris Sent: Thursday, December 23, 2010 2:35 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
File "D:\development\pymw\families\ncdb_family.py", line 152
def version(self, code): ^ IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
1.. def apipath(self, code): 2.. # raise NotImplementedError, "%s wiki family does not support api.php" % self.name 3.. # return '%s/api.php' % self.scriptpath(code) 4.. 5.. # Which version of MediaWiki is used? REQUIRED 6.. def version(self, code): 7.. # Replace with the actual version being run on your wiki 8.. return '1.16.0' For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
-- Bináris
------------------------------------------------------------------------------
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-------------------------------------------------------------------------------- _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I have fixed line 152 error by removing api support like in mozilla_family
but now I have another error
D:\Development\python>python.exe D:\development\pymw\login.py Traceback (most recent call last): File "D:\development\pymw\login.py", line 58, in <module> import re, os, query File "d:\development\pymw\query.py", line 28, in <module> import wikipedia, time File "D:\development\pymw\wikipedia.py", line 7600, in <module> getSite(noLogin=True) File "D:\development\pymw\wikipedia.py", line 7450, in getSite persistent_http=persistent_http) File "D:\development\pymw\wikipedia.py", line 4792, in __init__ self.family = Family(fam, fatal = False) File "D:\development\pymw\wikipedia.py", line 4613, in Family family = myfamily.Family() File "D:\development\pymw\families\ncdb_family.py", line 30, in __init__ 'Nintendo Cartridges Database Wiki': [u'Nintendo Cartridges Database Wiki', self.namespaces[4]['Nintendo Cartridges Database Wiki']], # REQUIRED KeyError: 'Nintendo Cartridges Database Wiki'
From: CobraSA Sent: Thursday, December 23, 2010 4:11 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
D:\Development\python>python.exe D:\development\pymw\generate_family_file.py Traceback (most recent call last): File "D:\development\pymw\generate_family_file.py", line 41, in <module> import family File "D:\development\pymw\family.py", line 10, in <module> import config File "D:\development\pymw\config.py", line 485, in <module> for _filename in os.listdir(os.path.join(_base_dir, 'families')): WindowsError: [Error 3] Le chemin dÆaccÞs spÚcifiÚ est introuvable: '.\families /*.*'
From: John Doe Sent: Thursday, December 23, 2010 3:58 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
Try using generate_family_files.py that should ensure that you dont have these problems
On Thu, Dec 23, 2010 at 9:43 AM, CobraSA CobraSA@live.com wrote:
Hi
I have changed ‘1.16.0’ for ‘pass’ or for ‘’ And still same error line 152.
Regards Cobra
From: Bináris Sent: Thursday, December 23, 2010 2:35 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
File "D:\development\pymw\families\ncdb_family.py", line 152
def version(self, code): ^ IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
1.. def apipath(self, code): 2.. # raise NotImplementedError, "%s wiki family does not support api.php" % self.name 3.. # return '%s/api.php' % self.scriptpath(code) 4.. 5.. # Which version of MediaWiki is used? REQUIRED 6.. def version(self, code): 7.. # Replace with the actual version being run on your wiki 8.. return '1.16.0' For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
-- Bináris
------------------------------------------------------------------------------
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-------------------------------------------------------------------------------- _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-------------------------------------------------------------------------------- _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
On 23 December 2010 16:11, CobraSA CobraSA@live.com wrote:
D:\Development\python>python.exe D:\development\pymw\generate_family_file.py
Please run scripts from the pywikipedia base folder. eg:
D:\Development\pwmw>..\python\python.exe generate_family_file.py
Hopefully it will work, then.
Best regards, Merlijn van Deen
2010/12/23 CobraSA CobraSA@live.com
Hi
I have changed ‘1.16.0’ for ‘pass’ or for ‘’ And still same error line 152. [image: Triste]
This is in function version, and the error is in function apipath.
Try to generate your family file with the tools of pywikibot, as told above.
I have followed everone’s instuctions and I get more and more errors
D:\Development\python>python generate_family_file.py Usage: %s <url> <short name> Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.o g/wiki/Main_Page ncdb Please insert a short name (eg: freeciv): ncdb Generating family file from http://nintendo-cartridges-database.the-chronicles. rg/wiki/Main_Page ncdb Traceback (most recent call last): File "generate_family_file.py", line 256, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 60, in run w = Wiki(self.base_url) File "generate_family_file.py", line 217, in __init__ data = urlopen(fromurl).read() File "generate_family_file.py", line 21, in urlopen return urllib2.urlopen(req) File "D:\Development\python\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "D:\Development\python\lib\urllib2.py", line 383, in open response = self._open(req, data) File "D:\Development\python\lib\urllib2.py", line 401, in _open '_open', req) File "D:\Development\python\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "D:\Development\python\lib\urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "D:\Development\python\lib\urllib2.py", line 1103, in do_open r = h.getresponse() File "D:\Development\python\lib\httplib.py", line 950, in getresponse response.begin() File "D:\Development\python\lib\httplib.py", line 390, in begin version, status, reason = self._read_status() File "D:\Development\python\lib\httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine
From: Bináris Sent: Thursday, December 23, 2010 2:35 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
File "D:\development\pymw\families\ncdb_family.py", line 152
def version(self, code): ^ IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
1.. def apipath(self, code): 2.. # raise NotImplementedError, "%s wiki family does not support api.php" % self.name 3.. # return '%s/api.php' % self.scriptpath(code) 4.. 5.. # Which version of MediaWiki is used? REQUIRED 6.. def version(self, code): 7.. # Replace with the actual version being run on your wiki 8.. return '1.16.0' For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
Interesting new error
D:\Development\python>python login.py Traceback (most recent call last): File "login.py", line 58, in <module> import re, os, query File "d:\development\pymw\query.py", line 28, in <module> import wikipedia, time File "D:\development\pymw\wikipedia.py", line 143, in <module> from pywikibot import * File "d:\development\pymw\pywikibot__init__.py", line 15, in <module> from exceptions import * File "d:\development\pymw\pywikibot\exceptions.py", line 13, in <module> import config File "D:\development\pymw\config.py", line 513, in <module> execfile(_filename) File "D:\Development\python\user-config.py", line 4, in <module> usernames['ncdb']['en'] = u'root' KeyError: 'ncdb'
From: Bináris Sent: Thursday, December 23, 2010 2:35 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
File "D:\development\pymw\families\ncdb_family.py", line 152
def version(self, code): ^ IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
1.. def apipath(self, code): 2.. # raise NotImplementedError, "%s wiki family does not support api.php" % self.name 3.. # return '%s/api.php' % self.scriptpath(code) 4.. 5.. # Which version of MediaWiki is used? REQUIRED 6.. def version(self, code): 7.. # Replace with the actual version being run on your wiki 8.. return '1.16.0' For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
/facepalm Delete your existing family file python generate_family_file.py INSERT_URL_TO_SITE ncdb
thats how your run generate family files.py
John
On Fri, Dec 24, 2010 at 10:52 PM, CobraSA CobraSA@live.com wrote:
Interesting new error
D:\Development\python>python login.py Traceback (most recent call last): File "login.py", line 58, in <module> import re, os, query File "d:\development\pymw\query.py", line 28, in <module> import wikipedia, time File "D:\development\pymw\wikipedia.py", line 143, in <module> from pywikibot import * File "d:\development\pymw\pywikibot__init__.py", line 15, in <module> from exceptions import * File "d:\development\pymw\pywikibot\exceptions.py", line 13, in <module> import config File "D:\development\pymw\config.py", line 513, in <module> execfile(_filename) File "D:\Development\python\user-config.py", line 4, in <module> usernames['ncdb']['en'] = u'root' KeyError: 'ncdb'
*From:* Bináris wikiposta@gmail.com *Sent:* Thursday, December 23, 2010 2:35 PM *To:* Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org *Subject:* Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
File "D:\development\pymw\families\ncdb_family.py", line 152
def version(self, code):
^
IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
def apipath(self, code):
# raise NotImplementedError, "%s wiki family does not
support api.php" % self.name 3. # return '%s/api.php' % self.scriptpath(code) 4. 5. # Which version of MediaWiki is used? REQUIRED 6. def version(self, code): 7. # Replace with the actual version being run on your wiki 8. return '1.16.0'
For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
-- Bináris
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
The file was deleted, I deleted it again:
D:\Development\python>python generate_family_file.py Usage: %s <url> <short name> Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb Please insert a short name (eg: freeciv): ncdb Generating family file from http://nintendo-cartridges-database.the-chronicles.o rg/wiki/Main_Page ncdb Traceback (most recent call last): File "generate_family_file.py", line 256, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 60, in run w = Wiki(self.base_url) File "generate_family_file.py", line 217, in __init__ data = urlopen(fromurl).read() File "generate_family_file.py", line 21, in urlopen return urllib2.urlopen(req) File "D:\Development\python\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "D:\Development\python\lib\urllib2.py", line 383, in open response = self._open(req, data) File "D:\Development\python\lib\urllib2.py", line 401, in _open '_open', req) File "D:\Development\python\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "D:\Development\python\lib\urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "D:\Development\python\lib\urllib2.py", line 1103, in do_open r = h.getresponse() File "D:\Development\python\lib\httplib.py", line 950, in getresponse response.begin() File "D:\Development\python\lib\httplib.py", line 390, in begin version, status, reason = self._read_status() File "D:\Development\python\lib\httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine
From: John Doe Sent: Saturday, December 25, 2010 5:06 AM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
/facepalm Delete your existing family file python generate_family_file.py INSERT_URL_TO_SITE ncdb
thats how your run generate family files.py
John
On Fri, Dec 24, 2010 at 10:52 PM, CobraSA CobraSA@live.com wrote:
Interesting new error
D:\Development\python>python login.py Traceback (most recent call last): File "login.py", line 58, in <module> import re, os, query File "d:\development\pymw\query.py", line 28, in <module> import wikipedia, time File "D:\development\pymw\wikipedia.py", line 143, in <module> from pywikibot import * File "d:\development\pymw\pywikibot__init__.py", line 15, in <module> from exceptions import * File "d:\development\pymw\pywikibot\exceptions.py", line 13, in <module> import config File "D:\development\pymw\config.py", line 513, in <module> execfile(_filename) File "D:\Development\python\user-config.py", line 4, in <module> usernames['ncdb']['en'] = u'root' KeyError: 'ncdb'
From: Bináris Sent: Thursday, December 23, 2010 2:35 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
File "D:\development\pymw\families\ncdb_family.py", line 152
def version(self, code): ^ IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
1.. def apipath(self, code): 2.. # raise NotImplementedError, "%s wiki family does not support api.php" % self.name 3.. # return '%s/api.php' % self.scriptpath(code) 4.. 5.. # Which version of MediaWiki is used? REQUIRED 6.. def version(self, code): 7.. # Replace with the actual version being run on your wiki 8.. return '1.16.0' For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
-- Bináris
------------------------------------------------------------------------------
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-------------------------------------------------------------------------------- _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Again review my example: python generate_family_file.py http://localhost/nintendo_cartridges_database/wiki ncdb
you might need to tweak the url to your main page but still
On Fri, Dec 24, 2010 at 11:33 PM, CobraSA CobraSA@live.com wrote:
The file was deleted, I deleted it again:
D:\Development\python>python generate_family_file.py Usage: %s <url> <short name> Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb Please insert a short name (eg: freeciv): ncdb Generating family file from http://nintendo-cartridges-database.the-chronicles.o rg/wiki/Main_Page ncdb Traceback (most recent call last): File "generate_family_file.py", line 256, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 60, in run w = Wiki(self.base_url) File "generate_family_file.py", line 217, in __init__ data = urlopen(fromurl).read() File "generate_family_file.py", line 21, in urlopen return urllib2.urlopen(req) File "D:\Development\python\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "D:\Development\python\lib\urllib2.py", line 383, in open response = self._open(req, data) File "D:\Development\python\lib\urllib2.py", line 401, in _open '_open', req) File "D:\Development\python\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "D:\Development\python\lib\urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "D:\Development\python\lib\urllib2.py", line 1103, in do_open r = h.getresponse() File "D:\Development\python\lib\httplib.py", line 950, in getresponse response.begin() File "D:\Development\python\lib\httplib.py", line 390, in begin version, status, reason = self._read_status() File "D:\Development\python\lib\httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine
*From:* John Doe phoenixoverride@gmail.com *Sent:* Saturday, December 25, 2010 5:06 AM *To:* Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org *Subject:* Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
/facepalm Delete your existing family file python generate_family_file.py INSERT_URL_TO_SITE ncdb
thats how your run generate family files.py
John
On Fri, Dec 24, 2010 at 10:52 PM, CobraSA CobraSA@live.com wrote:
Interesting new error
D:\Development\python>python login.py Traceback (most recent call last): File "login.py", line 58, in <module> import re, os, query File "d:\development\pymw\query.py", line 28, in <module> import wikipedia, time File "D:\development\pymw\wikipedia.py", line 143, in <module> from pywikibot import * File "d:\development\pymw\pywikibot__init__.py", line 15, in <module> from exceptions import * File "d:\development\pymw\pywikibot\exceptions.py", line 13, in <module> import config File "D:\development\pymw\config.py", line 513, in <module> execfile(_filename) File "D:\Development\python\user-config.py", line 4, in <module> usernames['ncdb']['en'] = u'root' KeyError: 'ncdb'
*From:* Bináris wikiposta@gmail.com *Sent:* Thursday, December 23, 2010 2:35 PM *To:* Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org *Subject:* Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
File "D:\development\pymw\families\ncdb_family.py", line 152
def version(self, code):
^
IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
def apipath(self, code):
# raise NotImplementedError, "%s wiki family does not
support api.php" % self.name 3. # return '%s/api.php' % self.scriptpath(code) 4. 5. # Which version of MediaWiki is used? REQUIRED 6. def version(self, code): 7. # Replace with the actual version being run on your wiki 8. return '1.16.0'
For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
-- Bináris
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
The wiki in online now. I couldn’t access offline because it id password protected
From: John Doe Sent: Saturday, December 25, 2010 6:21 AM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
Again review my example: python generate_family_file.py http://localhost/nintendo_cartridges_database/wiki ncdb
you might need to tweak the url to your main page but still
On Fri, Dec 24, 2010 at 11:33 PM, CobraSA CobraSA@live.com wrote:
The file was deleted, I deleted it again:
D:\Development\python>python generate_family_file.py Usage: %s <url> <short name> Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb Please insert a short name (eg: freeciv): ncdb Generating family file from http://nintendo-cartridges-database.the-chronicles.o rg/wiki/Main_Page ncdb Traceback (most recent call last): File "generate_family_file.py", line 256, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 60, in run w = Wiki(self.base_url) File "generate_family_file.py", line 217, in __init__ data = urlopen(fromurl).read() File "generate_family_file.py", line 21, in urlopen return urllib2.urlopen(req) File "D:\Development\python\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "D:\Development\python\lib\urllib2.py", line 383, in open response = self._open(req, data) File "D:\Development\python\lib\urllib2.py", line 401, in _open '_open', req) File "D:\Development\python\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "D:\Development\python\lib\urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "D:\Development\python\lib\urllib2.py", line 1103, in do_open r = h.getresponse() File "D:\Development\python\lib\httplib.py", line 950, in getresponse response.begin() File "D:\Development\python\lib\httplib.py", line 390, in begin version, status, reason = self._read_status() File "D:\Development\python\lib\httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine
From: John Doe Sent: Saturday, December 25, 2010 5:06 AM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
/facepalm Delete your existing family file python generate_family_file.py INSERT_URL_TO_SITE ncdb
thats how your run generate family files.py
John
On Fri, Dec 24, 2010 at 10:52 PM, CobraSA CobraSA@live.com wrote:
Interesting new error
D:\Development\python>python login.py Traceback (most recent call last): File "login.py", line 58, in <module> import re, os, query File "d:\development\pymw\query.py", line 28, in <module> import wikipedia, time File "D:\development\pymw\wikipedia.py", line 143, in <module> from pywikibot import * File "d:\development\pymw\pywikibot__init__.py", line 15, in <module> from exceptions import * File "d:\development\pymw\pywikibot\exceptions.py", line 13, in <module> import config File "D:\development\pymw\config.py", line 513, in <module> execfile(_filename) File "D:\Development\python\user-config.py", line 4, in <module> usernames['ncdb']['en'] = u'root' KeyError: 'ncdb'
From: Bináris Sent: Thursday, December 23, 2010 2:35 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
File "D:\development\pymw\families\ncdb_family.py", line 152
def version(self, code): ^ IndentationError: expected an indented block
Look, I found the error for you in the pastebin.
1.. def apipath(self, code): 2.. # raise NotImplementedError, "%s wiki family does not support api.php" % self.name 3.. # return '%s/api.php' % self.scriptpath(code) 4.. 5.. # Which version of MediaWiki is used? REQUIRED 6.. def version(self, code): 7.. # Replace with the actual version being run on your wiki 8.. return '1.16.0' For some reasons, the numbering begins from 1 after copying, but it is at the given place. The previous function contains ONLY comments, therefore it is not accepted and you get an indentation error. But the real error is not in line 152, it is in function apipath, which should contain at least one not-commented line. If you are sure that all this must be commented, then put a "pass" (empty instruction) in the apipath function, but I think that a function should return some value under any circumstances, that's why it is a function.
-- Bináris
----------------------------------------------------------------------------
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
------------------------------------------------------------------------------ _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-------------------------------------------------------------------------------- _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I have a great favor to ask to someone of you. Please send me a working package of python+pywikibot for your personal wiki So I just edit config and family and then it will work
Please I beg you all this is the most simple solution.
You just need to follow directions about running generate_family_files.py its not that hard, also my custom wiki follows a different setup than yours Just run generate family files like you where told: python generate_family_files.py URL_TO_YOUR_MAIN_PAGE ncdb if your run the exact command above but replace URL_TO_YOUR_MAIN_PAGE with an actual URL it will work
On Sat, Dec 25, 2010 at 11:11 AM, CobraSA CobraSA@live.com wrote:
I have a great favor to ask to someone of you. Please send me a working package of python+pywikibot for your personal wiki So I just edit config and family and then it will work
Please I beg you all this is the most simple solution.
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Check one of my previous message please. It didn’t work.
Even with the family file dlated
D:\Development\python>python generate_family_file.py Usage: %s <url> <short name> Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb Please insert a short name (eg: freeciv): ncdb Generating family file from http://nintendo-cartridges-database.the-chronicles.o rg/wiki/Main_Page ncdb Traceback (most recent call last): File "generate_family_file.py", line 256, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 60, in run w = Wiki(self.base_url) File "generate_family_file.py", line 217, in __init__ data = urlopen(fromurl).read() File "generate_family_file.py", line 21, in urlopen return urllib2.urlopen(req) File "D:\Development\python\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "D:\Development\python\lib\urllib2.py", line 383, in open response = self._open(req, data) File "D:\Development\python\lib\urllib2.py", line 401, in _open '_open', req) File "D:\Development\python\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "D:\Development\python\lib\urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "D:\Development\python\lib\urllib2.py", line 1103, in do_open r = h.getresponse() File "D:\Development\python\lib\httplib.py", line 950, in getresponse response.begin() File "D:\Development\python\lib\httplib.py", line 390, in begin version, status, reason = self._read_status() File "D:\Development\python\lib\httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine
D:\Development\python>
Please help me.
From: John Doe Sent: Saturday, December 25, 2010 5:18 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
You just need to follow directions about running generate_family_files.py its not that hard, also my custom wiki follows a different setup than yours Just run generate family files like you where told: python generate_family_files.py URL_TO_YOUR_MAIN_PAGE ncdb if your run the exact command above but replace URL_TO_YOUR_MAIN_PAGE with an actual URL it will work
On Sat, Dec 25, 2010 at 11:11 AM, CobraSA CobraSA@live.com wrote:
I have a great favor to ask to someone of you. Please send me a working package of python+pywikibot for your personal wiki So I just edit config and family and then it will work
Please I beg you all this is the most simple solution.
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-------------------------------------------------------------------------------- _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Ok you have NOT done it. The only URL that you have given was http://nintendo-cartridges-database.the-chronicles.or which is not a vaild URL, the valid version is http://nintendo-cartridges-database.the-chronicles.org (note the missing g) and that link is NOT to a wiki but rather a forum. Please do me a favor delete your existing ncdb family file, and go to your wiki's main page and copy/paste that address here. I will create either a working family file or a command that you will need to run to create it yourself (if it is on localhost).
John
On Sat, Dec 25, 2010 at 12:48 PM, CobraSA CobraSA@live.com wrote:
Check one of my previous message please. It didn’t work.
Even with the family file dlated
D:\Development\python>python generate_family_file.py Usage: %s <url> <short name> Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb Please insert a short name (eg: freeciv): ncdb Generating family file from http://nintendo-cartridges-database.the-chronicles.o rg/wiki/Main_Page ncdb Traceback (most recent call last): File "generate_family_file.py", line 256, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 60, in run w = Wiki(self.base_url) File "generate_family_file.py", line 217, in __init__ data = urlopen(fromurl).read() File "generate_family_file.py", line 21, in urlopen return urllib2.urlopen(req) File "D:\Development\python\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "D:\Development\python\lib\urllib2.py", line 383, in open response = self._open(req, data) File "D:\Development\python\lib\urllib2.py", line 401, in _open '_open', req) File "D:\Development\python\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "D:\Development\python\lib\urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "D:\Development\python\lib\urllib2.py", line 1103, in do_open r = h.getresponse() File "D:\Development\python\lib\httplib.py", line 950, in getresponse response.begin() File "D:\Development\python\lib\httplib.py", line 390, in begin version, status, reason = self._read_status() File "D:\Development\python\lib\httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine
D:\Development\python>
Please help me.
*From:* John Doe phoenixoverride@gmail.com *Sent:* Saturday, December 25, 2010 5:18 PM *To:* Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org *Subject:* Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
You just need to follow directions about running generate_family_files.py its not that hard, also my custom wiki follows a different setup than yours Just run generate family files like you where told: python generate_family_files.py URL_TO_YOUR_MAIN_PAGE ncdb if your run the exact command above but replace URL_TO_YOUR_MAIN_PAGE with an actual URL it will work
On Sat, Dec 25, 2010 at 11:11 AM, CobraSA CobraSA@live.com wrote:
I have a great favor to ask to someone of you. Please send me a working package of python+pywikibot for your personal wiki So I just edit config and family and then it will work
Please I beg you all this is the most simple solution.
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb
the g is on the next line I have entered http://nintendo-cartridges-database.the-chronicles.org/wiki/Main_Page ncdb
It is just cut because when you copy paste command line, it does that
From: John Sent: Saturday, December 25, 2010 6:58 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
Ok you have NOT done it. The only URL that you have given was http://nintendo-cartridges-database.the-chronicles.or which is not a vaild URL, the valid version is http://nintendo-cartridges-database.the-chronicles.org (note the missing g) and that link is NOT to a wiki but rather a forum. Please do me a favor delete your existing ncdb family file, and go to your wiki's main page and copy/paste that address here. I will create either a working family file or a command that you will need to run to create it yourself (if it is on localhost).
John
On Sat, Dec 25, 2010 at 12:48 PM, CobraSA CobraSA@live.com wrote:
Check one of my previous message please. It didn’t work.
Even with the family file dlated
D:\Development\python>python generate_family_file.py Usage: %s <url> <short name> Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb Please insert a short name (eg: freeciv): ncdb Generating family file from http://nintendo-cartridges-database.the-chronicles.o rg/wiki/Main_Page ncdb Traceback (most recent call last): File "generate_family_file.py", line 256, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 60, in run w = Wiki(self.base_url) File "generate_family_file.py", line 217, in __init__ data = urlopen(fromurl).read() File "generate_family_file.py", line 21, in urlopen return urllib2.urlopen(req) File "D:\Development\python\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "D:\Development\python\lib\urllib2.py", line 383, in open response = self._open(req, data) File "D:\Development\python\lib\urllib2.py", line 401, in _open '_open', req) File "D:\Development\python\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "D:\Development\python\lib\urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "D:\Development\python\lib\urllib2.py", line 1103, in do_open r = h.getresponse() File "D:\Development\python\lib\httplib.py", line 950, in getresponse response.begin() File "D:\Development\python\lib\httplib.py", line 390, in begin version, status, reason = self._read_status() File "D:\Development\python\lib\httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine
D:\Development\python>
Please help me.
From: John Doe Sent: Saturday, December 25, 2010 5:18 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
You just need to follow directions about running generate_family_files.py its not that hard, also my custom wiki follows a different setup than yours Just run generate family files like you where told: python generate_family_files.py URL_TO_YOUR_MAIN_PAGE ncdb if your run the exact command above but replace URL_TO_YOUR_MAIN_PAGE with an actual URL it will work
On Sat, Dec 25, 2010 at 11:11 AM, CobraSA CobraSA@live.com wrote:
I have a great favor to ask to someone of you. Please send me a working package of python+pywikibot for your personal wiki So I just edit config and family and then it will work
Please I beg you all this is the most simple solution.
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
------------------------------------------------------------------------------
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-------------------------------------------------------------------------------- _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
can you create an account for: Δ and email me the information?
On Sat, Dec 25, 2010 at 1:14 PM, CobraSA CobraSA@live.com wrote:
Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb
the g is on the next line I have entered http://nintendo-cartridges-database.the-chronicles.org/wiki/Main_Page ncdb
It is just cut because when you copy paste command line, it does that
*From:* John phoenixoverride@gmail.com *Sent:* Saturday, December 25, 2010 6:58 PM *To:* Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org *Subject:* Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
Ok you have NOT done it. The only URL that you have given was http://nintendo-cartridges-database.the-chronicles.or which is not a vaild URL, the valid version is http://nintendo-cartridges-database.the-chronicles.org (note the missing g) and that link is NOT to a wiki but rather a forum. Please do me a favor delete your existing ncdb family file, and go to your wiki's main page and copy/paste that address here. I will create either a working family file or a command that you will need to run to create it yourself (if it is on localhost).
John
On Sat, Dec 25, 2010 at 12:48 PM, CobraSA CobraSA@live.com wrote:
Check one of my previous message please. It didn’t work.
Even with the family file dlated
D:\Development\python>python generate_family_file.py Usage: %s <url> <short name> Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb Please insert a short name (eg: freeciv): ncdb Generating family file from http://nintendo-cartridges-database.the-chronicles.o rg/wiki/Main_Page ncdb Traceback (most recent call last): File "generate_family_file.py", line 256, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 60, in run w = Wiki(self.base_url) File "generate_family_file.py", line 217, in __init__ data = urlopen(fromurl).read() File "generate_family_file.py", line 21, in urlopen return urllib2.urlopen(req) File "D:\Development\python\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "D:\Development\python\lib\urllib2.py", line 383, in open response = self._open(req, data) File "D:\Development\python\lib\urllib2.py", line 401, in _open '_open', req) File "D:\Development\python\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "D:\Development\python\lib\urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "D:\Development\python\lib\urllib2.py", line 1103, in do_open r = h.getresponse() File "D:\Development\python\lib\httplib.py", line 950, in getresponse response.begin() File "D:\Development\python\lib\httplib.py", line 390, in begin version, status, reason = self._read_status() File "D:\Development\python\lib\httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine
D:\Development\python>
Please help me.
*From:* John Doe phoenixoverride@gmail.com *Sent:* Saturday, December 25, 2010 5:18 PM *To:* Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org *Subject:* Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
You just need to follow directions about running generate_family_files.py its not that hard, also my custom wiki follows a different setup than yours Just run generate family files like you where told: python generate_family_files.py URL_TO_YOUR_MAIN_PAGE ncdb if your run the exact command above but replace URL_TO_YOUR_MAIN_PAGE with an actual URL it will work
On Sat, Dec 25, 2010 at 11:11 AM, CobraSA CobraSA@live.com wrote:
I have a great favor to ask to someone of you. Please send me a working package of python+pywikibot for your personal wiki So I just edit config and family and then it will work
Please I beg you all this is the most simple solution.
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
You can access the wiki without an account.
From: John Sent: Saturday, December 25, 2010 7:41 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
can you create an account for: Δ and email me the information?
On Sat, Dec 25, 2010 at 1:14 PM, CobraSA CobraSA@live.com wrote:
Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb
the g is on the next line I have entered http://nintendo-cartridges-database.the-chronicles.org/wiki/Main_Page ncdb
It is just cut because when you copy paste command line, it does that
From: John Sent: Saturday, December 25, 2010 6:58 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
Ok you have NOT done it. The only URL that you have given was http://nintendo-cartridges-database.the-chronicles.or which is not a vaild URL, the valid version is http://nintendo-cartridges-database.the-chronicles.org (note the missing g) and that link is NOT to a wiki but rather a forum. Please do me a favor delete your existing ncdb family file, and go to your wiki's main page and copy/paste that address here. I will create either a working family file or a command that you will need to run to create it yourself (if it is on localhost).
John
On Sat, Dec 25, 2010 at 12:48 PM, CobraSA CobraSA@live.com wrote:
Check one of my previous message please. It didn’t work.
Even with the family file dlated
D:\Development\python>python generate_family_file.py Usage: %s <url> <short name> Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb Please insert a short name (eg: freeciv): ncdb Generating family file from http://nintendo-cartridges-database.the-chronicles.o rg/wiki/Main_Page ncdb Traceback (most recent call last): File "generate_family_file.py", line 256, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 60, in run w = Wiki(self.base_url) File "generate_family_file.py", line 217, in __init__ data = urlopen(fromurl).read() File "generate_family_file.py", line 21, in urlopen return urllib2.urlopen(req) File "D:\Development\python\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "D:\Development\python\lib\urllib2.py", line 383, in open response = self._open(req, data) File "D:\Development\python\lib\urllib2.py", line 401, in _open '_open', req) File "D:\Development\python\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "D:\Development\python\lib\urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "D:\Development\python\lib\urllib2.py", line 1103, in do_open r = h.getresponse() File "D:\Development\python\lib\httplib.py", line 950, in getresponse response.begin() File "D:\Development\python\lib\httplib.py", line 390, in begin version, status, reason = self._read_status() File "D:\Development\python\lib\httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine
D:\Development\python>
Please help me.
From: John Doe Sent: Saturday, December 25, 2010 5:18 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
You just need to follow directions about running generate_family_files.py its not that hard, also my custom wiki follows a different setup than yours Just run generate family files like you where told: python generate_family_files.py URL_TO_YOUR_MAIN_PAGE ncdb if your run the exact command above but replace URL_TO_YOUR_MAIN_PAGE with an actual URL it will work
On Sat, Dec 25, 2010 at 11:11 AM, CobraSA CobraSA@live.com wrote:
I have a great favor to ask to someone of you. Please send me a working package of python+pywikibot for your personal wiki So I just edit config and family and then it will work
Please I beg you all this is the most simple solution.
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
----------------------------------------------------------------------------
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
------------------------------------------------------------------------------
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-------------------------------------------------------------------------------- _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Hay dipshit I however cannot test and check to see if pywiki works because I cannot use login.py please stop being a pain in the ass and try to let us help you. I am going out of my way to try and help you, I have gotten a family file created however due to not having an account I cannot login and test it.
On Sat, Dec 25, 2010 at 2:44 PM, CobraSA CobraSA@live.com wrote:
You can access the wiki without an account.
*From:* John phoenixoverride@gmail.com *Sent:* Saturday, December 25, 2010 7:41 PM *To:* Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org *Subject:* Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
can you create an account for: Δ and email me the information?
On Sat, Dec 25, 2010 at 1:14 PM, CobraSA CobraSA@live.com wrote:
Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb
the g is on the next line I have entered http://nintendo-cartridges-database.the-chronicles.org/wiki/Main_Pagencdb
It is just cut because when you copy paste command line, it does that
*From:* John phoenixoverride@gmail.com *Sent:* Saturday, December 25, 2010 6:58 PM *To:* Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org *Subject:* Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
Ok you have NOT done it. The only URL that you have given was http://nintendo-cartridges-database.the-chronicles.or which is not a vaild URL, the valid version is http://nintendo-cartridges-database.the-chronicles.org (note the missing g) and that link is NOT to a wiki but rather a forum. Please do me a favor delete your existing ncdb family file, and go to your wiki's main page and copy/paste that address here. I will create either a working family file or a command that you will need to run to create it yourself (if it is on localhost).
John
On Sat, Dec 25, 2010 at 12:48 PM, CobraSA CobraSA@live.com wrote:
Check one of my previous message please. It didn’t work.
Even with the family file dlated
D:\Development\python>python generate_family_file.py Usage: %s <url> <short name> Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb Please insert a short name (eg: freeciv): ncdb Generating family file from http://nintendo-cartridges-database.the-chronicles.o rg/wiki/Main_Page ncdb Traceback (most recent call last): File "generate_family_file.py", line 256, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 60, in run w = Wiki(self.base_url) File "generate_family_file.py", line 217, in __init__ data = urlopen(fromurl).read() File "generate_family_file.py", line 21, in urlopen return urllib2.urlopen(req) File "D:\Development\python\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "D:\Development\python\lib\urllib2.py", line 383, in open response = self._open(req, data) File "D:\Development\python\lib\urllib2.py", line 401, in _open '_open', req) File "D:\Development\python\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "D:\Development\python\lib\urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "D:\Development\python\lib\urllib2.py", line 1103, in do_open r = h.getresponse() File "D:\Development\python\lib\httplib.py", line 950, in getresponse response.begin() File "D:\Development\python\lib\httplib.py", line 390, in begin version, status, reason = self._read_status() File "D:\Development\python\lib\httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine
D:\Development\python>
Please help me.
*From:* John Doe phoenixoverride@gmail.com *Sent:* Saturday, December 25, 2010 5:18 PM *To:* Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org *Subject:* Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
You just need to follow directions about running generate_family_files.py its not that hard, also my custom wiki follows a different setup than yours Just run generate family files like you where told: python generate_family_files.py URL_TO_YOUR_MAIN_PAGE ncdb if your run the exact command above but replace URL_TO_YOUR_MAIN_PAGE with an actual URL it will work
On Sat, Dec 25, 2010 at 11:11 AM, CobraSA CobraSA@live.com wrote:
I have a great favor to ask to someone of you. Please send me a working package of python+pywikibot for your personal wiki So I just edit config and family and then it will work
Please I beg you all this is the most simple solution.
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Hi CobraSA,
please revert your changes in wikipedia.py and config.py. It is almost impossible to help you with modified files and some of your errors results on these changes. Next please enable api read access. At the moment api is read protected and results in an error. This is needed for the automatic generate_family_file run generate_family_file.py with URL "http://nintendo-cartridges-database.the-chronicles.org/wiki". Note that "/wiki" is needed since "nintendo-cartridges-database.the-chronicles.org" does not lead to the main page.
Greetings xqt
----- Original Nachricht ---- Von: CobraSA CobraSA@live.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 25.12.2010 20:44 Betreff: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
You can access the wiki without an account.
From: John Sent: Saturday, December 25, 2010 7:41 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
can you create an account for: ? and email me the information?
On Sat, Dec 25, 2010 at 1:14 PM, CobraSA CobraSA@live.com wrote:
Please insert URL to wiki: http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb
the g is on the next line I have entered http://nintendo-cartridges-database.the-chronicles.org/wiki/Main_Page ncdb
It is just cut because when you copy paste command line, it does that
From: John Sent: Saturday, December 25, 2010 6:58 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki
Ok you have NOT done it. The only URL that you have given was http://nintendo-cartridges-database.the-chronicles.or which is not a vaild URL, the valid version is http://nintendo-cartridges-database.the-chronicles.org (note the missing g) and that link is NOT to a wiki but rather a forum. Please do me a favor delete your existing ncdb family file, and go to your wiki's main page and copy/paste that address here. I will create either a working family file or a command that you will need to run to create it yourself (if it is on localhost).
John
On Sat, Dec 25, 2010 at 12:48 PM, CobraSA CobraSA@live.com wrote:
Check one of my previous message please. It didn?t work. Even with the family file dlated D:\Development\python>python generate_family_file.py Usage: %s <url> <short name> Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file families/mywiki_family.py Please insert URL to wiki:
http://nintendo-cartridges-database.the-chronicles.or g/wiki/Main_Page ncdb Please insert a short name (eg: freeciv): ncdb Generating family file from http://nintendo-cartridges-database.the-chronicles.o rg/wiki/Main_Page ncdb Traceback (most recent call last): File "generate_family_file.py", line 256, in <module> FamilyFileGenerator(*sys.argv[1:]).run() File "generate_family_file.py", line 60, in run w = Wiki(self.base_url) File "generate_family_file.py", line 217, in __init__ data = urlopen(fromurl).read() File "generate_family_file.py", line 21, in urlopen return urllib2.urlopen(req) File "D:\Development\python\lib\urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "D:\Development\python\lib\urllib2.py", line 383, in open response = self._open(req, data) File "D:\Development\python\lib\urllib2.py", line 401, in _open '_open', req) File "D:\Development\python\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "D:\Development\python\lib\urllib2.py", line 1130, in http_open return self.do_open(httplib.HTTPConnection, req) File "D:\Development\python\lib\urllib2.py", line 1103, in do_open r = h.getresponse() File "D:\Development\python\lib\httplib.py", line 950, in getresponse response.begin() File "D:\Development\python\lib\httplib.py", line 390, in begin version, status, reason = self._read_status() File "D:\Development\python\lib\httplib.py", line 354, in _read_status raise BadStatusLine(line) httplib.BadStatusLine
D:\Development\python> Please help me. From: John Doe Sent: Saturday, December 25, 2010 5:18 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] setting my custom bot for my ncdb wiki You just need to follow directions about running
generate_family_files.py its not that hard, also my custom wiki follows a different setup than yours Just run generate family files like you where told: python generate_family_files.py URL_TO_YOUR_MAIN_PAGE ncdb if your run the exact command above but replace URL_TO_YOUR_MAIN_PAGE with an actual URL it will work
On Sat, Dec 25, 2010 at 11:11 AM, CobraSA <CobraSA@live.com> wrote: I have a great favor to ask to someone of you. Please send me a working package of python+pywikibot for your personal
wiki So I just edit config and family and then it will work
Please I beg you all this is the most simple solution. _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
--
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
pywikipedia-l@lists.wikimedia.org