[bugs:#1642] wikipedia.py has bug on .exist

Status: open
Created: Fri Jul 12, 2013 08:55 PM UTC by reza
Last Updated: Fri Jul 12, 2013 08:55 PM UTC
Owner: nobody

since 8 July wikipedia.py has bug in .exist() for example if we run this code

import wikipedia
Orgine_Site=wikipedia.getSite('en',fam='wikipedia')
my_page = wikipedia.Page(Orgine_Site, 'Iran')
my_data = wikipedia.DataPage(my_page)
if my_data.exists():
wikipedia.output('ok')

it shows this bug

reza@willow:~/pyreza$ python test.py
Traceback (most recent call last):
File "test.py", line 5, in
if my_data.exists():
File "/home/reza/pyreza/wikipedia.py", line 1335, in exists
self.get()
File "/home/reza/pyreza/wikipedia.py", line 4693, in get
self._getentity(args, *kwargs)
File "/home/reza/pyreza/wikipedia.py", line 4629, in _getentity
self._title = self._contents['entity'].title()
AttributeError: 'list' object has no attribute 'title'


Sent from sourceforge.net because Pywikipedia-bugs@lists.wikimedia.org is subscribed to https://sourceforge.net/p/pywikipediabot/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/pywikipediabot/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.