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

Unsupported backend "sqlite" #65

Closed
ssbunyk opened this issue Sep 13, 2013 · 6 comments
Closed

Unsupported backend "sqlite" #65

ssbunyk opened this issue Sep 13, 2013 · 6 comments

Comments

@ssbunyk
Copy link

ssbunyk commented Sep 13, 2013

Python 2.7.2

$ howdoi ask
Traceback (most recent call last):
  File "/opt/zenoss/bin/howdoi", line 8, in <module>
    load_entry_point('howdoi==1.1.4', 'console_scripts', 'howdoi')()
  File "/opt/zenoss/lib/python2.7/site-packages/howdoi/howdoi.py", line 217, in command_line_runner
    print(howdoi(args).encode('utf-8', 'ignore'))
  File "/opt/zenoss/lib/python2.7/site-packages/howdoi/howdoi.py", line 176, in howdoi
    return get_instructions(args) or 'Sorry, couldn\'t find any help with that topic\n'
  File "/opt/zenoss/lib/python2.7/site-packages/howdoi/howdoi.py", line 143, in get_instructions
    links = get_links(args['query'])
  File "/opt/zenoss/lib/python2.7/site-packages/howdoi/howdoi.py", line 68, in get_links
    result = get_result(url)
  File "/opt/zenoss/lib/python2.7/site-packages/howdoi/howdoi.py", line 59, in get_result
    return requests.get(url, headers={'User-Agent': random.choice(USER_AGENTS)}, proxies=get_proxies()).text
  File "/opt/zenoss/lib/python2.7/site-packages/requests/api.py", line 55, in get
    return request('get', url, **kwargs)
  File "/opt/zenoss/lib/python2.7/site-packages/requests/api.py", line 43, in request
    session = sessions.Session()
  File "/opt/zenoss/lib/python2.7/site-packages/requests_cache/core.py", line 155, in <lambda>
    **backend_options)
  File "/opt/zenoss/lib/python2.7/site-packages/requests_cache/core.py", line 63, in __init__
    (backend, ', '.join(backends.registry.keys())))
ValueError: Unsupported backend "sqlite" try one of: redis, memory
@gleitz
Copy link
Owner

gleitz commented Sep 13, 2013

I can't reproduce this issue on my installation of 2.7.2. I also see that the travis-ci build passes on 2.7.2. Is it possible you have some sort of special environment setup?

I believe the issue is with requests-cache. Please check your installation of requests-cache. What version are you using?

@tsaulic
Copy link

tsaulic commented Sep 15, 2013

I have the same issue. Using homebrew sqlite 3.8.0.2 and also stock sqlite. Using python 2.7.5 also installed via homebrew. 'brew doctor' says the system is ready to brew.

requests-cache - Persistent cache for requests library
INSTALLED: 0.4.3 (latest)

I'll try older versions of requests-cache and report.

@tsaulic
Copy link

tsaulic commented Sep 16, 2013

Tried 0.4.2 and 0.4.3 requests-cache both at home and on my work Mac, same thing as the OP. If I try to use howdoi in an anaconda env, it runs but I get a 'Failed to establish network connection'. Might be worth to note that I have to be authenticated via TLS (dot1x) on my network port. All other tools work fine/have network access.

@tsaulic
Copy link

tsaulic commented Sep 20, 2013

Managed to fix it. Looks like my python wasn't built with sqlite (I installed sqlite after).

Just do:

brew uninstall sqlite gdbm python
brew install sqlite gdbm --universal
brew install python --universal --framework

And it should work :) Hope it works for OP too.

@gleitz
Copy link
Owner

gleitz commented Sep 20, 2013

Thanks for the solution; closing the issue.

@gleitz gleitz closed this as completed Sep 20, 2013
@gleitz
Copy link
Owner

gleitz commented Oct 30, 2013

I ran into this issue again after upgrading to Mavericks. I fixed it with:

brew rm sqlite python
brew install python

SQLite3 will be installed automatically as a dependency.

Note: there is also a fix in requests-cache but I don't think it is in the latest version yet.

gleitz added a commit that referenced this issue Oct 31, 2013
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

3 participants