Hi! In my work we have a wikipedia on MediaWiki engine. Yesterday I downloaded pywikipedia framework to use a bot. Unfortunately, when I try to run category.py script I get the following error message: ======================================== root@/var/www/pywikipedia> python category.py move Please enter the old name of the category: foo Please enter the new name of the category: bar Traceback (most recent call last): File "category.py", line 949, in ? main() File "category.py", line 919, in main bot.run() File "category.py", line 395, in run self.editSummary = i18n.twtranslate(site, 'category-changing') \ File "/var/www/pywikipedia/pywikibot/i18n.py", line 226, in twtranslate transdict = getattr(__import__("i18n", {}, {}, [package]), package).msg ImportError: No module named i18n ========================================
My user-config.py file is: family = 'WBDWiki' mylang = 'pl' usernames['WBDWiki']['pl'] = u'WikiBot' console_encoding = 'utf-8'
where 'pl' = Polish (Poland)
MediaWiki 1.16.1, PHP 5.2.10, MySQL 5.0.45, Python 2.4.3
Any ideas?
Thank in advance for your help.
Regards,
Hello Danny,
On 21 May 2011 09:27, Danny danny373@gmail.com wrote:
In my work we have a wikipedia on MediaWiki engine. Yesterday I downloaded pywikipedia framework to use a bot.
Where did you download the framework? What version are you running (python version.py)?
And as a quick check, does the 'i18n' directory exist?
Best regards, Merlijn
Hello Merlijn, and thank you for your reply.
On Sat, May 21, 2011 at 1:23 PM, Merlijn van Deen valhallasw@arctus.nl wrote:
Where did you download the framework?
I downloaded it from this page: http://toolserver.org/~pywikipedia/nightly/ Then: 1) I unpacked the files to a directory /var/www/pywikipedia on our server. 2) I created user-config.py file. 3) I created /var/www/pywikipedia/families/WBDWiki_family.py file.
What version are you running (python version.py)?
root@/var/www/pywikipedia> python version.py Pywikipedia (r9212 (wikipedia.py), 2011/05/04, 03:59:16) Python 2.4.3 (#1, May 24 2008, 13:47:28) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] config-settings: use_api = True use_api_login = True unicode test: ok
And as a quick check, does the 'i18n' directory exist?
No, this directory does not exist. But there is a file 'i18n.py' in directory /var/www/pywikibot.
Best regards,
Hi Danny
you should create /var/www/pywikipedia/i18n sub-directory and copy its content from from rewrite branch http://svn.wikimedia.org/viewvc/pywikipedia/branches/rewrite/scripts/i18n/?p...
It seems externals are no longer included to nightly dump. @Merlijn: could you change this behaviour especial for i18n subdir?
Greetings Xqt
----- Original Nachricht ---- Von: Danny danny373@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 22.05.2011 11:52 Betreff: Re: [Pywikipedia-l] pywikipedia - ImportError: No module named i18n
Hello Merlijn, and thank you for your reply.
On Sat, May 21, 2011 at 1:23 PM, Merlijn van Deen valhallasw@arctus.nl wrote:
Where did you download the framework?
I downloaded it from this page: http://toolserver.org/~pywikipedia/nightly/ Then:
- I unpacked the files to a directory /var/www/pywikipedia on our server.
- I created user-config.py file.
- I created /var/www/pywikipedia/families/WBDWiki_family.py file.
What version are you running (python version.py)?
root@/var/www/pywikipedia> python version.py Pywikipedia (r9212 (wikipedia.py), 2011/05/04, 03:59:16) Python 2.4.3 (#1, May 24 2008, 13:47:28) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] config-settings: use_api = True use_api_login = True unicode test: ok
And as a quick check, does the 'i18n' directory exist?
No, this directory does not exist. But there is a file 'i18n.py' in directory /var/www/pywikibot.
Best regards,
Danny
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Hello Danny and Xqt,
On 22 May 2011 13:17, info@gno.de wrote:
It seems externals are no longer included to nightly dump. @Merlijn: could you change this behaviour especial for i18n subdir?
Yes, this was on purpose. The Spelling external is quite large, and does not change often. I now included the i18n folder (see https://github.com/valhallasw/pywikipedia-nightly-generation/commit/f88e1044... ).
Danny: you should now be able to download a working nightly at http://pywikipedia.org/nightly/ !
Best, Merlijn
Danny: you should now be able to download a working nightly at http://pywikipedia.org/nightly/ !
Oh, nice! Since when is this redirect valid?
Greetings xqt
On Sun, May 22, 2011 at 6:33 PM, Merlijn van Deen valhallasw@arctus.nl wrote:
Danny: you should now be able to download a working nightly at http://pywikipedia.org/nightly/%C2%A0!
Hooray! Now it works very well and without any errors. :-) Thanks guys!
Regards,