Cobertos / DoxygenMediawikiBot

A python bot using PyWikibot and Doxygen to put Doxygen docs onto a MediaWiki wiki
MIT License
2 stars 1 forks source link

unable to connect #1

Open abhishek-nvcc opened 8 years ago

abhishek-nvcc commented 8 years ago

i am very new to python, and any other scripting language. i am very new to anything which got to do with server/client/connections.

i was trying to set up my own wiki for updating doxygen documents. 1) used wamp for server 2) used mediawiki for the wiki infrastructure 3) got a page up-and-running on localhost 4) tried this addin 5) did all the pre-processing necessary to before running, "python doxymw.py" 6) however, the command, "python doxymw.py", gives connection error message, like the following, "ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it"

what am i missing?

here is the extended log for the command run.

D:...\installs\mediawiki\DoxygenMediawikiBot-master>python doxymw.py WARNING: Running on Windows and transliteration_target is not set. Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Pywikibot/Windows ERROR: Traceback (most recent call last): File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\data\api.py", line 1557, in submit body=body, headers=headers) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\toolsinit.py", line 1105, in wrapper return obj(args, *kw) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\comms\http.py", line 279, in request r = fetch(baseuri, method, body, headers, kwargs) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\comms\http.py", line 381, in fetch error_handling_callback(request) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\comms\http.py", line 297, in error_handling_callback raise request.data File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\comms\threadedhttp.py", line 221, in request max_redirects, connection_type File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\site-packages\httplib2-0.9.2-py3.5.egg\httplib2init**.py", line 1314, in r equest (response, content) = self._request(conn, authority, uri, requesturi, method, body, headers, redirections, cachekey) File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\site-packages\httplib2-0.9.2-py3.5.egg\httplib2init.py", line 1064, in request (response, content) = self._conn_request(conn, request_uri, method, body, headers) File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\site-packages\httplib2-0.9.2-py3.5.egg\httplib2init.py", line 987, in _c onn_request conn.connect() File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\http\client.py", line 1229, in connect super().connect() File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\http\client.py", line 826, in connect (self.host,self.port), self.timeout, self.source_address) File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\socket.py", line 707, in create_connection raise err File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\socket.py", line 698, in create_connection sock.connect(sa) ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

WARNING: Waiting 5 seconds before retrying. Traceback (most recent call last): File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\data\api.py", line 1557, in submit body=body, headers=headers) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\toolsinit.py", line 1105, in wrapper return obj(args, *kw) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\comms\http.py", line 279, in request r = fetch(baseuri, method, body, headers, kwargs) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\comms\http.py", line 381, in fetch error_handling_callback(request) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\comms\http.py", line 297, in error_handling_callback raise request.data File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\comms\threadedhttp.py", line 221, in request max_redirects, connection_type File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\site-packages\httplib2-0.9.2-py3.5.egg\httplib2init**.py", line 1314, in r equest (response, content) = self._request(conn, authority, uri, requesturi, method, body, headers, redirections, cachekey) File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\site-packages\httplib2-0.9.2-py3.5.egg\httplib2init.py", line 1064, in request (response, content) = self._conn_request(conn, request_uri, method, body, headers) File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\site-packages\httplib2-0.9.2-py3.5.egg\httplib2init.py", line 987, in _c onn_request conn.connect() File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\http\client.py", line 1229, in connect super().connect() File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\http\client.py", line 826, in connect (self.host,self.port), self.timeout, self.source_address) File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\socket.py", line 707, in create_connection raise err File "C:\Users...\AppData\Local\Programs\Python\Python35-32\lib\socket.py", line 698, in create_connection sock.connect(sa) ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "doxymw.py", line 16, in from doxymwsite import DoxyMWSite File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\doxymwsite.py", line 8, in from doxymwpage import DoxygenHTMLPage, CategoryPage, BotUserPage, TransclusionPage, ImagePage, StylesPage File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\doxymwpage.py", line 337, in class DoxygenHTMLPage(DoxyMWPage): File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\doxymwpage.py", line 347, in DoxygenHTMLPage globalCategory = CategoryPage(doxymwglobal.config["mediaWiki_docsCategory"],hidden=True) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\doxymwpage.py", line 310, in init super().init(normtitle=DoxyMWTitle(title), updateStrategy=CategoryPage.getStrategy(kwargs)) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\doxymwpage.py", line 25, in init** self.title = DoxyMWTitle.normalize(title) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\doxymwpage.py", line 78, in normalize return DoxyMWTitle.hardNorm(DoxyMWTitle.softNorm(title)) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\doxymwpage.py", line 68, in hardNorm link.parse() #Will cause it to fail if not a valid title File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\page.py", line 4677, in parse if self._site.namespaces[self._namespace].case == 'first-letter': File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\site.py", line 806, in namespaces self._namespaces = _NamespacesDict(self._build_namespaces()) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\site.py", line 2158, in _build_namespaces is_mw114 = MediaWikiVersion(self.version()) >= MediaWikiVersion('1.14') File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\site.py", line 2260, in version version = self.siteinfo.get('generator', expiry=1).split(' ')[1] File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\site.py", line 1348, in get preloaded = self._get_general(key, expiry) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\site.py", line 1294, in _get_general default_info = self._get_siteinfo(props, expiry) File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\site.py", line 1221, in _get_siteinfo data = request.submit() File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\data\api.py", line 1890, in submit self._data = super(CachedRequest, self).submit() File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\data\api.py", line 1581, in submit self.wait() File "D:...\installs\mediawiki\DoxygenMediawikiBot-master\pywikibot\data\api.py", line 1758, in wait time.sleep(self.retry_wait) KeyboardInterrupt <class 'KeyboardInterrupt'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

Cobertos commented 8 years ago

My guess is that it's a configuration problem within PyWikibot. Make sure you created the family files needed to make that work and they're pointing to your wiki installation at localhost.

I updated the README.md with better steps on how to do the setup (with links to the other stuff too)