Bugs item #3199823, was opened at 2011-03-04 19:00 Message generated for change (Comment added) made by valhallasw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3199823...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Daniel Barrett (djbarrett) Assigned to: Nobody/Anonymous (nobody) Summary: redirect.py crash: TypeError: __import__() takes no...
Initial Comment: redirect.py immediately crashes with:
$ sudo python redirect.py broken Traceback (most recent call last): File "redirect.py", line 799, in ? main() File "redirect.py", line 795, in main bot.run() File "redirect.py", line 713, in run self.delete_broken_redirects() File "redirect.py", line 484, in delete_broken_redirects reason = i18n.twtranslate(self.site, reason_broken) File "/usr/local/pywikipedia/pywikibot/i18n.py", line 220, in twtranslate transdict = getattr(__import__("i18n", fromlist=[package]), package).msg TypeError: __import__() takes no keyword arguments
$ python version.py Pywikipedia [http] trunk/pywikipedia (r9018, 2011/03/02, 06:46:39) Python 2.4.3 (#1, Sep 3 2009, 15:37:37) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] config-settings: use_api = True use_api_login = True unicode test: ok
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2011-03-04 20:26
Message: Hi Daniel,
This parameter was added in python 2.5. As far as I know, no steps have been taken in the rewrite to ensure python <= 2.4 compatibility -- you will probably run into more problems, even if this specific issue is fixed. I would strongly suggest upgrading to 2.5.
As a secondary note - why are you using 'sudo python'? Pywikipediabot has not been written to be 'safe to use as root' - there might be bugs that will allow an attacker to take over your computer if you run it as root.
Best regards,
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett) Date: 2011-03-04 19:02
Message: "python redirect.py double" also crashes:
$ sudo python redirect.py double Retrieving special page... Retrieved 107 redirects from special page.
ASP.Net precompile <<<
Links to: [[ASP.Net precompiler]]. Links to: [[ASP.Net precompilation]]. Traceback (most recent call last): File "redirect.py", line 799, in ? main() File "redirect.py", line 795, in main bot.run() File "redirect.py", line 711, in run self.fix_double_redirects() File "redirect.py", line 539, in fix_double_redirects self.fix_1_double_redirect(redir_name) File "redirect.py", line 664, in fix_1_double_redirect summary = i18n.twtranslate(self.site, msg_double) \ File "/usr/local/pywikipedia/pywikibot/i18n.py", line 220, in twtranslate transdict = getattr(__import__("i18n", fromlist=[package]), package).msg TypeError: __import__() takes no keyword arguments
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3199823...