Last modified: 2014-07-23 14:14:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57224, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55224 - Wrong language with a one-site family can yield confusing er
Wrong language with a one-site family can yield confusing er
Status: RESOLVED DUPLICATE of bug 65044
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:46 UTC by Kunal Mehta (Legoktm)
Modified: 2014-07-23 14:14 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:46:26 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1390/
Reported by: valhallasw
Created on: 2012-01-07 00:10:07
Subject: Wrong language with a one-site family can yield confusing er
Original description:
valhallasw@dorthonion:~/src/pywikipedia/trunk$ python version.py
Pywikipedia \[http\] trunk/pywikipedia \(r9820, 2011/12/29, 12:08:55\)
Python 2.6.5 \(r265:79063, Apr 16 2010, 13:09:56\)
\[GCC 4.4.3\]
config-settings:
use\_api = True
use\_api\_login = True
unicode test: ok

valhallasw@dorthonion:~/src/pywikipedia/trunk$ cat user-config.py
mylang='de'
site='botwiki'
usernames\['botwiki'\]\['de'\] = u'valhallasw'


valhallasw@dorthonion:~/src/pywikipedia/trunk$ python generate\_family\_file.py http://botwiki.sno.cc/wiki/Main\_Page botwiki
Generating family file from http://botwiki.sno.cc/wiki/Main\_Page

==================================
api url: http://botwiki.sno.cc/w/api.php
MediaWiki version: 1.17.0
==================================

Determining other languages...
Loading wikis...
\* en...  in cache
Retrieving namespaces...  en
Writing families/botwiki\_family.py...
families/botwiki\_family.py already exists. Overwrite? \(y/n\)y


valhallasw@dorthonion:~/src/pywikipedia/trunk$ python login.py
Traceback \(most recent call last\):
File "login.py", line 436, in <module>
main\(\)
File "login.py", line 431, in main
loginMan = LoginManager\(password, sysop = sysop, verbose=verbose\)
File "login.py", line 106, in \_\_init\_\_
raise pywikibot.NoUsername\(u'ERROR: Username for %s:%s is undefined.\nIf you have an account for that site, please add such a line to user-config.py:\n\nusernames\[\'%s\'\]\[\'%s\'\] = \'myUsername\'' % \(self.site.family.name, self.site.lang, self.site.family.name, self.site.lang\)\)
pywikibot.exceptions.NoUsername: ERROR: Username for botwiki:botwiki is undefined.
If you have an account for that site, please add such a line to user-config.py:

usernames\['botwiki'\]\['botwiki'\] = 'myUsername'


however, the correct error message would be

valhallasw@dorthonion:~/src/pywikipedia/trunk$ python login.py
Traceback \(most recent call last\):
File "login.py", line 436, in <module>
main\(\)
File "login.py", line 431, in main
loginMan = LoginManager\(password, sysop = sysop, verbose=verbose\)
File "login.py", line 106, in \_\_init\_\_
raise pywikibot.NoUsername\(u'ERROR: Username for %s:%s is undefined.\nIf you have an account for that site, please add such a line to user-config.py:\n\nusernames\[\'%s\'\]\[\'%s\'\] = \'myUsername\'' % \(self.site.family.name, self.site.lang, self.site.family.name, self.site.lang\)\)
pywikibot.exceptions.NoUsername: ERROR: Username for botwiki:botwiki is undefined.
If you have an account for that site, please add such a line to user-config.py:

usernames\['botwiki'\]\['en'\] = 'myUsername'
Comment 1 Ricordisamoa 2014-07-23 14:14:26 UTC

*** This bug has been marked as a duplicate of bug 65044 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links