SpyTec created this task.
SpyTec added a subscriber: SpyTec.
SpyTec added a project: pywikibot-core.
Herald added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
Currently when trying to use the Category.articles definition in the
pywikibot module with a sortby key, it throws the following error:
```
File "core\pywikibot\page.py", line 2402, in articles
member_type=['page', 'file']
File "core\pywikibot\site.py", line 3272, in categorymembers
excluded_namespaces.add([-1, -2])
TypeError: unhashable type: 'list'
<class 'TypeError'>
CRITICAL: Closing network session.
```
This is the code I was using:
```
site = pywikibot.Site()
cat = pywikibot.Category(site,'Category:Name')
articles = cat.articles(sortby="timestamp")
```
This happens with or without the namespace parameter, this is running with
the following PWB and Python versions on Windows 8:
```
Pywikibot: [https] r-pywikibot-core.git (2ab6c39, g5818, 2015/06/22,
14:01:18, ok)
Release version: 2.0b3
requests version: 2.7.0
cacerts: C:\Python34\lib\site-packages\requests\cacert.pem
certificate test: ok
Python: 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit
(AMD64)]
unicode test: ok
PYWIKIBOT2_DIR: Not set
PYWIKIBOT2_DIR_PWB:
PYWIKIBOT2_NO_USER_CONFIG: Not set
```
and
```
requests version: 2.4.3
cacerts: C:\Python27\lib\site-packages\requests\cacert.pem
certificate test: ok
Python: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
unicode test: ok
```
TASK DETAIL
https://phabricator.wikimedia.org/T103410
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: SpyTec
Cc: Aklapper, pywikibot-bugs-list, SpyTec, jayvdb, Malyacko, P.Copp
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs