Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Site' object has no attribute 'search_advanced' for some mac users #33

Open
lukasschwab opened this issue Feb 2, 2015 · 2 comments
Open
Assignees

Comments

@lukasschwab
Copy link

This is an extension of an issue on stackit, a project I built using the Py-StackExchange wrapper.

Our pip install process automatically installs Py-StackExchange, equivalent to running pip install Py-StackExchange at the command line. However, when using our code, this error is produced, but only for some users: AttributeError: 'Site' object has no attribute 'search_advanced'.

At the hackathon where we built stackit, we solved the problem by cloning and modifying Py-StackExchange's setup.py; the modified version is in this gist. That manual installation and modification has worked so far, but is a clunky solution for our users.

I suspect that this has something to do with the Python versions found on each computer, and am perplexed that this functionality would be removed for a user that can ultimately compile and run it in their environment once they've modified setup.py.

Also, this project was a life-saver––heartfelt "thank you" from team Baby Got Stack!

@lucjon
Copy link
Owner

lucjon commented Feb 3, 2015

Thanks for reporting this. I must admit I'm having trouble reproducing the problem, although I imagine that that has more to do with peculiarities of my setup than with your users'. I did notice that the version I obtained manually from PyPI was actually old enough that it did not contain the advanced_search method — though I do then wonder how installing through pip worked at all!

I have pushed a new version to PyPI which does include the new method. If you still have a means of reproducing the problem, I would be very grateful if you could see if it persists.

If it does persist, would you be able to confirm that the setup.py modifications are necessary to make it work again? I'm reluctant to remove the Python 2.6 classification globally since it is still a supported target for the library — but then again, if it's causing the problem, I will certainly need to do some more digging.

Thanks,
Lucas

@lucjon lucjon self-assigned this Feb 3, 2015
@lukasschwab
Copy link
Author

Yes, this problem persists even when manually installing from the code in this Github repo.

I am running out of the stock Terminal on OS X 10.10 Yosemite. I have Python 2.6 and Python 2.7 installed on this machine. Python 2.7.6 is the default.

I'm not sure how to determine whether setup.py modifications are necessary; if I were to take a guess, I'd say that setup.py probably detects Python 2.6 on my machine and installs accordingly, which means it doesn't include the new API methods in the install. What do you think?

I can do some further digging, but this is on my backburner (at least for the next couple of days).

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants