| Urbanecm added a comment. |
@Sc4s2cg I feel like sharing more details (like link to the wiki you're trying to use) to enable us to replicate the issue if we can is warranted. If you don't want to post it publishly, you can create a private paste via https://phabricator.wikimedia.org/paste/edit/form/36/, which will allow access to people you add via the "Subscribers" field (please include @Dvorapa and me, because we do not fulfil the second condition and we're trying to help you) and people who signed a NDA with the WMF.
To show complete working process, I can easily add my wiki to PWB.
urbanecm@notebook ~/bin/pywikibot-core
$ python3 generate_family_file.py
Usage: generate_family_file.py <url> <short name>
Example: generate_family_file.py https://www.mywiki.bogus/wiki/Main_Page mywiki
This will create the file families/mywiki_family.py
Please insert URL to wiki: https://titanium.webappky.cz/~urbanecm/testwiki/index.php/Hlavn%C3%AD_strana
Please insert a short name (eg: freeciv): urbanecmtestwiki
Generating family file from https://titanium.webappky.cz/~urbanecm/testwiki/index.php/Hlavn%C3%AD_strana
==================================
api url: https://titanium.webappky.cz/~urbanecm/testwiki/api.php
MediaWiki version: 1.31.0-rc.0
==================================
Determining other languages...
Loading wikis...
* cs... in cache
Writing /home/urbanecm/unsynced/git/wmf/gerrit/pywikibot/core/pywikibot/families/urbanecmtestwiki_family.py...
urbanecm@notebook ~/bin/pywikibot-core
$ vim user-config.py # Adding a username to user-config.py
urbanecm@notebook ~/bin/pywikibot-core
$ python3 pwb.py login -family:urbanecmtestwiki -lang:cs
Password for user UrbanecmBot on urbanecmtestwiki:cs (no characters will be shown):
Logging in to urbanecmtestwiki:cs as UrbanecmBot
WARNING: API warning (main): Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.
WARNING: API warning (login): Main-account login via "action="" is deprecated and may stop working without warning. To continue login with "action="" see [[Special:BotPasswords]]. To safely continue using main-account login, see "action=""
WARNING: /home/urbanecm/unsynced/git/wmf/gerrit/pywikibot/core/pywikibot/tools/__init__.py:1719: UserWarning: File /home/urbanecm/unsynced/git/wmf/gerrit/pywikibot/core/pywikibot.lwp had 644 mode; converted to 600 mode.
warn(warn_str.format(filename, st_mode - stat.S_IFREG, mode))
Logged in on urbanecmtestwiki:cs as UrbanecmBot.
urbanecm@notebook ~/bin/pywikibot-core
$ # Some warnings throwned above, but non-critical, so we're logged in
urbanecm@notebook ~/bin/pywikibot-core
$ python3 pwb.py add_text -page:"Test page for T196683" -text:"Some text for T196683" -family:urbanecmtestwiki -lang:cs
Loading Test page for T196683...
>>> Test page for T196683 <<<
@@ -1 +1,2 @@
- I created a page
+ I created a page
+ Some text for T196683
Do you want to accept these changes? ([y]es, [N]o, [a]ll, open in [b]rowser,
[q]uit): y
Sleeping for 8.1 seconds, 2018-06-23 16:12:07
Page [[Test page for T196683]] saved
urbanecm@notebook ~/bin/pywikibot-core
$ python3
Python 3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywikibot
>>> site = pywikibot.Site('cs', 'urbanecmtestwiki')
>>> page = pywikibot.Page(site, u"Test page for T196683")
>>> print(page.text)
I created a page
Some text for T196683
>>> Ctrl+D
<class 'NameError'>
CRITICAL: Closing network session.
urbanecm@notebook ~/bin/pywikibot-core
$You can verify sucessfullness of such adding on https://titanium.webappky.cz/~urbanecm/testwiki/index.php?title=Test_page_for_T196683&diff=3&oldid=2.
For the record, see below for version details.
urbanecm@notebook ~/bin/pywikibot-core
$ python3 pwb.py version
Pywikibot: [ssh] pywikibot-core.git (46de1bc, g9726, 2018/06/21, 08:27:56, ok)
Release version: 3.1.dev0
requests version: 2.18.1
cacerts: /etc/ssl/certs/ca-certificates.crt
certificate test: ok
Python: 3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0]
PYWIKIBOT2_DIR: Not set
PYWIKIBOT2_DIR_PWB:
PYWIKIBOT2_NO_USER_CONFIG: Not set
Config base dir: /home/urbanecm/unsynced/git/wmf/gerrit/pywikibot/core
Usernames for family "commons":
*: UrbanecmBot (no sysop configured)
Usernames for family "wikipedia":
*: UrbanecmBot (no sysop configured)
Usernames for family "wikiversity":
*: UrbanecmBot (no sysop configured)
Usernames for family "urbanecmtestwiki":
*: UrbanecmBot (no sysop configured)
Usernames for family "wikidata":
wikidata: UrbanecmBot (no sysop configured)
urbanecm@notebook ~/bin/pywikibot-core
$You are free to test with this wiki, registration should be open.
Cc: Urbanecm, Dalba, zhuyifei1999, Chicocvenancio, Framawiki, Dvorapa, Aklapper, pywikibot-bugs-list, Sc4s2cg, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
