lukasschwab / stackit

StackOverflow queries from the command line
MIT License
314 stars 28 forks source link

'Site' object has no attribute 'search_advanced' #2

Closed KyCodeHuynh closed 9 years ago

KyCodeHuynh commented 9 years ago

Amazing work at SB Hacks, y'all. Sadly, it appears dependency hell has hit again, as when I try stackit -s "How do I create a bash alias?", I see this:

Traceback (most recent call last):
  File "/usr/local/bin/stackit", line 9, in <module>
    load_entry_point('stackit==0.1.2', 'console_scripts', 'stackit')()
  File "build/bdist.macosx-10.10-x86_64/egg/stackit/stackit_core.py", line 188, in main
  File "build/bdist.macosx-10.10-x86_64/egg/stackit/stackit_core.py", line 65, in searchTerm
AttributeError: 'Site' object has no attribute 'search_advanced'
lukasschwab commented 9 years ago

@KyCodeHuynh Okay, this is a problem we ran into ourselves, and has to do with the distribution of the Python wrapper for the StackExchange API.

We're working on a gist or something to explain the fix (which should be in our README sooner than later). Basically, you have to clone the wrapper repo, modify some of the source, and run python setup.py install yourself.

@vickiniu can you explain the change? Also, we should open an issue with them.

sotayamashita commented 9 years ago

I have same issue

MahdiHatami commented 9 years ago

same issue

lukasschwab commented 9 years ago

@KyCodeHuynh @sota0805 @MahdiHatami I've summarized the changes and linked a gist that should solve the problem below––this is what we did at SB Hacks to solve the problem when we encountered it.

  1. Clone the Py-StackExchange repo––unfortunately, you'll have to install it manually for now.
  2. Open setup.py in a text editor. Modify line 17 to read version = '2.2.1',. Remove line 27: 'Programming Language :: Python :: 2.6',. Alternatively, copy-paste or download the gist that contains the solved version of setup.py
  3. At the command line, in the Py-StackExchange directory, run python setup.py install.

Let me know if this works//doesn't for you––even if it does, I'm leaving this issue open as a reminder to myself to report the bug to the Py-StackExchange creators.

Update: created issue in the Py-StackExchange repo.