nausheenfatma / python-wikitools

Automatically exported from code.google.com/p/python-wikitools
0 stars 0 forks source link

pagelist.listFromTitles() provides non-existent pageid argument to wikifile.File when creating file objects from a list #46

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The following occurs when using a string list of File page names to create a 
list of page objects: 

  File "C:\Python26\lib\site-packages\wikitools\pagelist.py", line 157, in makePage
  item = wikifile.File(site, title=title, check=False, followRedir=False, pageid=key)
  TypeError: __init__() got an unexpected keyword argument 'pageid'

In wikifile.py, 'File' does not ask for this argument.

What steps will reproduce the problem?
1. Import wikitools, define a wiki object. 
2. The below will produce the unexpected keyword error from above:
 a = pagelist.listFromTitles(wiki, [ 'File:Example file.png' ])

What version of the product are you using? On what operating system?
python-wikitools 1.1.1. Python 2.6.6, Windows 7 64-bit.

Removing 'pageid=key' from Line 157 prevents the error and produces correct 
file objects with the listFromTitles() function, but I am sceptical as to 
whether this is a viable solution.

Original issue reported on code.google.com by unleashe...@gmail.com on 28 Oct 2011 at 8:50

GoogleCodeExporter commented 8 years ago

Original comment by MrZmanwiki@gmail.com on 5 Feb 2012 at 2:48