cd scripts #This step is necessary for core, don't do it in compat
git clone https://gerrit.wikimedia.org/r/pywikibot/i18n.git
Note: If you cloned pywikibot with
--recursive
option or you downloaded nightly, i18n submodule is already there and no need to install anything.
And git clone says: "fatal: destination path 'i18n' already exists and is not an empty directory."
But I cloned it with --recursive! Despite that i18n subdirectory consists of a sole .git file. Shall I delete the directory and try again?
Did you install the i18n module?
https://mediawiki.org/wiki/Manual:Pywikibot/i18n (Or is that bundled in the PyPI release?)It used to be mentioned on the "installation" page but that one is a bit out of date./AndréOn 16 May 2017 15:25, "Bináris" <wikiposta@gmail.com> wrote:______________________________Hi,(Usernames deleted)
after a miserable login process I tried to do my first edit with core (latest version). Not very surprisingly, I couldn't. I tried to enter a search-replace pair, then enter to continue. What's wrong?
c:\Pywikibot>pwb replace.py -page:user:BinBot/semmi
Please enter the text that should be replaced: S
Please enter the new text: Q
Please enter another text that should be replaced,
or press Enter to start:
Traceback (most recent call last):
File "C:\Pywikibot\pwb.py", line 263, in <module>
if not main():
File "C:\Pywikibot\pwb.py", line 256, in main
run_python_file(filename, [filename] + args, argvu, file_package)
File "C:\Pywikibot\pwb.py", line 121, in run_python_file
main_mod.__dict__)
File ".\scripts\replace.py", line 1166, in <module>
main()
File ".\scripts\replace.py", line 1023, in main
' (-%s +%s)' % (replacement.old, replacement.new)}
File "C:\Pywikibot\pywikibot\tools\__init__.py", line 1448, in wrapper
return obj(*__args, **__kw)
File "C:\Pywikibot\pywikibot\i18n.py", line 621, in twtranslate
trans = _get_translation(alt, twtitle)
File "C:\Pywikibot\pywikibot\i18n.py", line 324, in _get_translation
_messages_package_name, filename).decode('utf-8')
AttributeError: 'NoneType' object has no attribute 'decode'
<class 'AttributeError'>
CRITICAL: Closing network session.
c:\Pywikibot>pwb version.py
Pywikibot: [ssh] pywikibot-core.git (9085b71, g8205, 2017/05/05, 18:08:09, n/a)
Release version: 3.0-dev
requests version: 2.14.2
cacerts: C:\Program Files\Python36\lib\site-packages\requests\cacert.pem
certificate test: ok
Python: 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)]
PYWIKIBOT2_DIR: Not set
PYWIKIBOT2_DIR_PWB: C:\Pywikibot
PYWIKIBOT2_NO_USER_CONFIG: Not set
Config base dir: c:\Pywikibot_________________
pywikibot mailing list
pywikibot@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot
_______________________________________________
pywikibot mailing list
pywikibot@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot