disqus-python icon indicating copy to clipboard operation
disqus-python copied to clipboard

Bug with first lines of code in documentation?

Open lee-hodg opened this issue 10 years ago • 9 comments

I installed disqus-python then tried the basic example with my secret key and public key:

pip install disqus-python
from disqusapi import DisqusAPI
disqus = DisqusAPI(secret_key, public_key)

However now when I do

disqus.get('trends.listThreads')

I get the error:

TypeError: __call__() takes exactly 1 argument (2 given)

lee-hodg avatar Nov 13 '14 12:11 lee-hodg

I see now that the version pip installed doesn't match the current master, nevertheless even installing with

 pip install git+https://github.com/disqus/disqus-python.git

I had issues with disqus.get('trends.listThreads') and needed to use disqus.get('trends.listThreads', method='GET'), so I guess the docs should be updated to reflect this.

lee-hodg avatar Nov 13 '14 12:11 lee-hodg

Bump. This doesn't appear to work at all.

onyxfish avatar Dec 31 '14 20:12 onyxfish

thanks for the bump, @onyxfish fix is on the way!

ivanov avatar Dec 31 '14 21:12 ivanov

pip install disqus-python still installs a version that errors as above.

File "update.py", line 70, in run_disqus for result in disqus.get("posts.list", forum="myforum"): TypeError: call() takes exactly 1 argument (3 given)

rmtew avatar Jun 16 '15 09:06 rmtew

+1

svengt avatar Dec 16 '15 10:12 svengt

+1

Still getting this error as of Jan 2016

loneboat avatar Jan 25 '16 20:01 loneboat

@loneboat

I had luck by following the directions here

https://github.com/disqus/disqus-python/issues/22

What you need to do is do a pip install of this

pip install https://github.com/disqus/disqus-python/archive/master.zip

mxrss avatar Jan 25 '16 22:01 mxrss

Am using Python 3. The error changed to InterfaceNotDefined: Interface is not defined, you must pass ``method`` (HTTP Method). ...after I redid pip install from the git master.

@fpghost suggestion above for result in disqus.get('trends.listThreads', method='GET'): fixed it (thanks!) now it is nicely returning threads. Would be handy if this missing bit of code was in the original README.rst

aktivkohle avatar Feb 21 '17 14:02 aktivkohle

2018 here, still not fixed. This is really badly maintained.

martinosorb avatar Mar 06 '18 23:03 martinosorb