jayvdb created this task.
jayvdb added subscribers: pywikipedia-bugs, jayvdb, XZise.
jayvdb added a project: pywikibot-core.
TASK DESCRIPTION
generating family files can create break site.interwiki .
```
$ python pwb.py generate_family_file.py http://wiki-commons.genealogy.net/Hauptseite genealogy2
Generating family file from http://wiki-commons.genealogy.net/Hauptseite
==================================
api url: http://wiki-commons.genealogy.net/w/api.php
MediaWiki version: 1.14.1
==================================
Determining other languages...de en nl
There are 4 languages available.
Do you want to generate interwiki links? This might take a long time. ([y]es/[N]o/[e]dit)y
Loading wikis...
* de... 'utf8' codec can't decode byte 0xfc in position 26478: invalid start byte
* en... downloaded
* nl... downloaded
* de... in cache
Writing pywikibot/families/genealogy2_family.py...
pywikibot/families/genealogy2_family.py already exists. Overwrite? (y/n)y
[jayvdb@localhost new]$ cat pywikibot/families/genealogy2_family.py
# -*- coding: utf-8 -*-
"""
This family file was auto-generated by $Id: 2dd21e4aaf7a93cf8749be841552881a80684b52 $
Configuration parameters:
url = http://wiki-commons.genealogy.net/Hauptseite
name = genealogy2
Please do not commit this to the Git repository!
"""
from pywikibot import family
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'genealogy2'
self.langs = {
'nl': 'wiki-nl.genealogy.net',
'de': 'wiki-commons.genealogy.net',
'en': 'wiki-en.genealogy.net',
}
def scriptpath(self, code):
return {
'nl': '/w',
'de': '/w',
'en': '/w',
}[code]
def version(self, code):
return {
'nl': u'1.14.1',
'de': u'1.14.1',
'en': u'1.14.1',
}[code]
```
That family has three different hostnames, and the keys are different to the subdomain. That might be relevant.
When I alter APISite._cache_interwikimap to re-raise the Error it catches, we see
```
$ python -m unittest tests.link_tests.TestFullyQualifiedNoLangFamilyImplicitLinkParser.test_fully_qualified_NS1_family
max_retries reduced from 25 to 1 for tests
======================================================================
ERROR: test_fully_qualified_NS1_family (tests.link_tests.TestFullyQualifiedNoLangFamilyImplicitLinkParser)
Test 'wikidata:testwiki:Talk:Q6' on enwp is namespace 1.
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/link_tests.py", line 813, in test_fully_qualified_NS1_family
link.parse()
File "pywikibot/page.py", line 4189, in parse
newsite = self._site.interwiki(prefix)
File "pywikibot/site.py", line 692, in interwiki
self._cache_interwikimap()
File "pywikibot/site.py", line 676, in _cache_interwikimap
site = (pywikibot.Site(url=iw['url']), 'local' in iw)
File "pywikibot/__init__.py", line 564, in Site
code = family.from_url(url)
File "pywikibot/family.py", line 1076, in from_url
'\$1'.format(self._get_path_regex()), url)
File "pywikibot/family.py", line 1058, in _get_path_regex
'family.'.format(self.name))
Error: Pywikibot is unable to generate an automatic path regex for the family genealogy2. It is recommended to overwrite "_get_path_regex" in that family.
----------------------------------------------------------------------
Ran 1 test in 2.645s
FAILED (errors=1)
```
TASK DETAIL
https://phabricator.wikimedia.org/T85658
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Aklapper, jayvdb, XZise, pywikipedia-bugs
Dalba created this task.
Dalba added a subscriber: Dalba.
Dalba added projects: Pywikibot-login.py, pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
Python 3.4.3 win32 while using IDLE and an up-to-date version of pywikibot:
```
>>> import pywikibot as pwb
>>> pwb.Site('fa').login()
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
pwb.Site('fa').login()
File "E:\core\pywikibot\site.py", line 1676, in login
if loginMan.login(retry=True):
File "E:\core\pywikibot\login.py", line 232, in login
password=True)
File "E:\core\pywikibot\bot.py", line 540, in input
data = ui.input(question, password)
File "E:\core\pywikibot\userinterfaces\terminal_interface_base.py", line 212, in input
self.output(question + ' ')
File "E:\core\pywikibot\userinterfaces\terminal_interface_base.py", line 191, in output
self._print(text, targetStream)
File "E:\core\pywikibot\userinterfaces\terminal_interface_base.py", line 132, in _print
self.printColorized(text, targetStream)
File "E:\core\pywikibot\userinterfaces\terminal_interface_win32.py", line 91, in printColorized
targetStream.write(text.encode(self.encoding, 'replace'))
File "C:\Python34\lib\idlelib\PyShell.py", line 1344, in write
raise TypeError('must be str, not ' + type(s).__name__)
TypeError: must be str, not bytes
>>>
```
TASK DETAIL
https://phabricator.wikimedia.org/T91921
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Dalba
Cc: pywikipedia-bugs, Aklapper, Dalba, jayvdb
Xqt created this task.
Xqt added a subscriber: Xqt.
Xqt added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
```
markiere: [[Spezial:Beiträge/84.128.23.123|84.128.23.123]]
ERROR: Detected MediaWiki API exception Exception; raising
something unexpeted happend, trace:
Traceback (most recent call last):
File ".\scripts\vm-auto-erl-neu.py", line 540, in run
else:
File ".\scripts\vm-auto-erl-neu.py", line 221, in markBlockedusers
vmPage.put(newRawText,
File "C:\pwb\core\pywikibot\page.py", line 1124, in put
**kwargs)
File "C:\pwb\core\pywikibot\tools\__init__.py", line 953, in wrapper
del __kw[old_arg]
File "C:\pwb\core\pywikibot\page.py", line 1043, in save
**kwargs)
File "C:\pwb\core\pywikibot\page.py", line 1054, in _save
watch=watchval, bot=botflag, **kwargs)
File "C:\pwb\core\pywikibot\site.py", line 1059, in callee
return fn(self, *args, **kwargs)
File "C:\pwb\core\pywikibot\site.py", line 4142, in editpage
result = req.submit()
File "C:\pwb\core\pywikibot\data\api.py", line 1679, in submit
raise APIMWException(class_name, info, **result["error"])
TypeError: __init__() got multiple values for keyword argument 'info'```
TASK DETAIL
https://phabricator.wikimedia.org/T97112
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: pywikipedia-bugs, Xqt, Aklapper, jayvdb
jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
Calling the `help` module on older generators results in a pywikibot `APIError` exception.
http://wiki.linuxgaming.de/api.php?action=help&modules=help&format=json (MW 1.14)
```
{"error":{"code":"help","info":"","*":"\n \n \n ******************************************************************\n ** **\n ** This is an auto-generated MediaWiki API documentation page **\n ** ...."}}
```
```
>>> s = pywikibot.Site('de', 'lgde')
>>> r = pywikibot.data.api.Request(site=s, action='help', modules='help')
>>> r.submit()
Found 1 lgde:de processes running, including this one.
API Error: query=
{'action': [u'help'],
'format': ['json'],
'maxlag': ['5'],
'modules': [u'help']}
response=....
'}}
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "pywikibot/data/api.py", line 1361, in submit
raise APIError(code, info, **result["error"])
APIError: help:
```
Note that the `modules` param for module `help` doesnt work in MW 1.14
TASK DETAIL
https://phabricator.wikimedia.org/T93192
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: pywikipedia-bugs, jayvdb, Aklapper
jayvdb closed blocking task T90338: Password inputs in Python 3.4.2 show the question after the password is entered as "Resolved".
TASK DETAIL
https://phabricator.wikimedia.org/T60053
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Xqt, jayvdb, valhallasw, Ricordisamoa, Ladsgroup, XZise, Dalba, pywikipedia-bugs
Xqt created this task.
Xqt added a subscriber: Xqt.
Xqt added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
we have textlib.replaceExcept() which does replacements except for parts inside exceptions regexes.
It would be great to have ist opposite which does replacements inside given regexes or tags only
TASK DETAIL
https://phabricator.wikimedia.org/T97893
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: pywikipedia-bugs, Xqt, Aklapper, jayvdb