alexz-enwp / wikitools

Python package for working with MediaWiki wikis
105 stars 51 forks source link

Cant delete pages #39

Closed tshrinivasan closed 8 years ago

tshrinivasan commented 8 years ago

When tried to use delete() method on a wiki page,

page.delete(pagename, reason="spam") getting the following error.

File "delete-pages.py", line 118, in delete_page(page_name) File "delete-pages.py", line 101, in delete_page page.delete(pagename, reason = "spam") TypeError: delete() got multiple values for keyword argument 'reason'

I tried giving various values for reason including True and False.

Getting same error.

Please guide me on how to delete the pages.

Thanks.

tshrinivasan commented 8 years ago

It was my mistake.

Have to use as

page.delete( reason = "spam")

It is working now.

mzmcbride commented 8 years ago

I'm glad you figured it out! :-)

If you think that the wikitools documentation can be improved, please submit a pull request.