https://bugzilla.wikimedia.org/show_bug.cgi?id=60381
Web browser: --- Bug ID: 60381 Summary: Return of the AttributeError: 'Page' object has no attribute '_isredir' Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: UNCONFIRMED Severity: major Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: geofbot@gmail.com Classification: Unclassified Mobile Platform: ---
We thought this was fixed, but alas...
local-sn1pebot@tools-login:~/core/pywikibot$ python Python 2.7.3 (default, Sep 26 2013, 20:03:06) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import pywikibot site = pywikibot.getSite() page = pywikibot.Page(site) page.get("Cat")
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/data/project/sn1pebot/.local/lib/python2.7/site-packages/pywikibot/__init__.py", line 356, in wrapper return method(*__args, **__kw) File "/data/project/sn1pebot/.local/lib/python2.7/site-packages/pywikibot/__init__.py", line 356, in wrapper return method(*__args, **__kw) File "/data/project/sn1pebot/.local/lib/python2.7/site-packages/pywikibot/page.py", line 300, in get self._getInternals(sysop) File "/data/project/sn1pebot/.local/lib/python2.7/site-packages/pywikibot/page.py", line 330, in _getInternals if self._isredir: AttributeError: 'Page' object has no attribute '_isredir'
https://bugzilla.wikimedia.org/show_bug.cgi?id=60381
--- Comment #1 from Geoffrey Mon geofbot@gmail.com --- Note that the pywikibot package is a symlink to the latest git version of core.
https://bugzilla.wikimedia.org/show_bug.cgi?id=60381
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Summary|Return of the |Page with empty title |AttributeError: 'Page' |raises "AttributeError: |object has no attribute |'Page' object has no |'_isredir' |attribute '_isredir'" on | |.get() Ever confirmed|0 |1
--- Comment #2 from Merlijn van Deen valhallasw@arctus.nl ---
page = pywikibot.Page(site)
I think this should raise an exception, as it creates a Page object without title:
page
Page()
On the other hand, it's equivalent to
page = pywikibot.Page(site, '')
which should be the main page.
In any case, the correct way to do what you want is ]
page = pywikibot.Page(site, "Cat") page.get()
https://bugzilla.wikimedia.org/show_bug.cgi?id=60381
--- Comment #3 from Geoffrey Mon geofbot@gmail.com --- Oh, wow, thanks.
My haphazard syntax has led to the discovery of a different bug!
https://bugzilla.wikimedia.org/show_bug.cgi?id=60381
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |Normal CC| |info@gno.de Severity|major |enhancement
https://bugzilla.wikimedia.org/show_bug.cgi?id=60381
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |70936
https://bugzilla.wikimedia.org/show_bug.cgi?id=60381
Sorawee Porncharoenwase nullzero.free@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |nullzero.free@gmail.com Resolution|--- |FIXED
--- Comment #4 from Sorawee Porncharoenwase nullzero.free@gmail.com --- Merged: [[gerrit:163305]]
pywikipedia-bugs@lists.wikimedia.org