GithubHelp home page GithubHelp logo

Getting an error trying to run about pgcli HOT 8 CLOSED

dbcli avatar dbcli commented on June 27, 2024
Getting an error trying to run

from pgcli.

Comments (8)

sillypog avatar sillypog commented on June 27, 2024

I get a slightly different error on OSX 10.10, using Python 2.7 and Postgresql 9.2.4.

~ $pgcli --help
Traceback (most recent call last):
  File "/usr/local/bin/pgcli", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: Click

from pgcli.

amjith avatar amjith commented on June 27, 2024

@rpoole Can you tell me how you're launching pgcli? What are the command line params?

It looks like the database connection is failing. I should report a more sensible error message for that.

from pgcli.

amjith avatar amjith commented on June 27, 2024

@sillypog Your error message is because Click is not installed. Click is a dependency of pgcli that should be installed when you do a pip install pgcli.

Can you tell me how you installed pgcli?

from pgcli.

thiagophx avatar thiagophx commented on June 27, 2024

Hi @amjith, thanks a lot for this project!
I get the same error as @sillypog, and I did install pgcli using pip.
Here's the output:

$ pgcli
Traceback (most recent call last):
  File "/usr/local/bin/pgcli", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: Click

$ pip install pgcli
Requirement already satisfied (use --upgrade to upgrade): pgcli in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): Click in /Library/Python/2.7/site-packages (from pgcli)
Requirement already satisfied (use --upgrade to upgrade): prompt-toolkit in /Library/Python/2.7/site-packages (from pgcli)
Requirement already satisfied (use --upgrade to upgrade): psycopg2 in /Library/Python/2.7/site-packages (from pgcli)
Requirement already satisfied (use --upgrade to upgrade): sqlparse in /Library/Python/2.7/site-packages (from pgcli)
Requirement already satisfied (use --upgrade to upgrade): docopt in /Library/Python/2.7/site-packages (from prompt-toolkit->pgcli)
Requirement already satisfied (use --upgrade to upgrade): jedi>=0.8.1 in /Library/Python/2.7/site-packages (from prompt-toolkit->pgcli)
Requirement already satisfied (use --upgrade to upgrade): pygments in /Library/Python/2.7/site-packages (from prompt-toolkit->pgcli)
Requirement already satisfied (use --upgrade to upgrade): six>=1.8.0 in /Library/Python/2.7/site-packages (from prompt-toolkit->pgcli)
Requirement already satisfied (use --upgrade to upgrade): wcwidth in /Library/Python/2.7/site-packages (from prompt-toolkit->pgcli)
Cleaning up...

$ which python
/usr/bin/python

$ pip freeze | grep 'click\|pgcli'
click==3.3
pgcli==0.10.0

It seems that pgcli and click were installed successfully, but it still doesn't work.
Any idea why?

Thanks in advance.

from pgcli.

amjith avatar amjith commented on June 27, 2024

@sillypog @thiagophx Let's track this issue on #27. The original issue reported by @rpoole seems unrelated to the ones you guys are facing.

from pgcli.

cezio avatar cezio commented on June 27, 2024

@rpoole Which psycopg version you're using? Context Manager support in cursor was added in 2.5 http://pythonhosted.org//psycopg2/news.html#what-s-new-in-psycopg-2-5

from pgcli.

rpoole avatar rpoole commented on June 27, 2024

@cezio that was it! I had an old version of psycopg2 (2.4.5).

Thanks for the help and the hard work on the tool - it looks great!

from pgcli.

amjith avatar amjith commented on June 27, 2024

Version 0.10.1 released to PyPI. https://pypi.python.org/pypi/pgcli/0.10.1

from pgcli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.