nausheenfatma / python-wikitools

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

APIRequest.changeParam() relies on the undefined variable "wiki" #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Short explanation of the problem:

The function APIRequest.changeParam() relies on the undefined variable "wiki."

I get the following error message when I try to log in.

 > Traceback (most recent call last):

(some lines skipped)

 >   File "C:\Python26\lib\site-packages\wikitools\wiki.py", line 142, in login
 >       req.changeParam('lgtoken', info['login']['token'])
 >   File "C:\Python26\lib\site-packages\wikitools\api.py", line 76, in
changeParam
 >     self.request = urllib2.Request(wiki.apibase, self.encodeddata,
self.headers)
 > NameError: global name 'wiki' is not defined

Expected behavior:

"self.wiki" should be used. No error should be occur.

Diffs of the problem (if applicable):

Original issue reported on code.google.com by beep...@gmail.com on 6 May 2010 at 2:18

GoogleCodeExporter commented 8 years ago
By the way, I was using version 1.0.

Original comment by beep...@gmail.com on 6 May 2010 at 2:23

GoogleCodeExporter commented 8 years ago
I really messed up explaining this. I meant that since the login patch for 1.0 
relies
on the broken APIRequest.changeParam(), the patch should fix 
APIRequest.changeParam().

Original comment by beep...@gmail.com on 6 May 2010 at 4:49

GoogleCodeExporter commented 8 years ago
I've fixed the patch. Thanks for the report.

Original comment by MrZmanwiki@gmail.com on 6 May 2010 at 5:25