Closed elgrove closed 10 months ago
I ran brew install six
and got an upgrade of six from 1.16.0_3 -> 1.16.0_4, this progressed me to a new error
❯ pgcli
/opt/homebrew/Cellar/pgcli/4.0.0/libexec/lib/python3.12/site-packages/pgspecial/main.py:237: SyntaxWarning: invalid escape sequence '\w'
"""
Traceback (most recent call last):
File "/opt/homebrew/bin/pgcli", line 5, in <module>
from pgcli.main import cli
File "/opt/homebrew/Cellar/pgcli/4.0.0/libexec/lib/python3.12/site-packages/pgcli/main.py", line 21, in <module>
from cli_helpers.tabular_output import TabularOutputFormatter
File "/opt/homebrew/Cellar/pgcli/4.0.0/libexec/lib/python3.12/site-packages/cli_helpers/tabular_output/__init__.py", line 11, in <module>
from .output_formatter import format_output, TabularOutputFormatter
File "/opt/homebrew/Cellar/pgcli/4.0.0/libexec/lib/python3.12/site-packages/cli_helpers/tabular_output/output_formatter.py", line 15, in <module>
from . import (
File "/opt/homebrew/Cellar/pgcli/4.0.0/libexec/lib/python3.12/site-packages/cli_helpers/tabular_output/tabulate_adapter.py", line 17, in <module>
import tabulate
ModuleNotFoundError: No module named 'tabulate'
python-tabulate is installed already, so I reinstalled it brew reinstall python-tabulate
Now pgcli works!
brew upgrade six
brew reinstall python-tabulate
I also had the problem with python-tabulate
and brew reinstall python-tabulate
fixed this. I've reinstalled six
but I'm still getting the SyntaxWarning: invalid escape sequence '\w'
warning.
The tabulate
problem prevented pgcli
from running. The other warning is just a warning... for now 😄
MacOS Sonoma 14.1 pgcli installed using homebrew, upgraded to 4.0 when the new homebrew formula was released
Looks like it's because of this (now fixed) issue in pgspecial: https://github.com/dbcli/pgspecial/pull/145
The fix was included into pgspecial
2.1.1, already released. See if this helps.
Hmmm, if I install from source locally, it pulls the 2.1.1 release. However, I tried brew reinstall pgcli
and brew uninstall pgcli; brew install pgcli
and it's still using the 2.1.0 release.
A bit more digging and I found the culprit: the homebrew formula has the 2.1.0 release pinned in pgcli's resources
(Now to recall the instructions for submitting a patch for a new homebrew release...)
Thanks for digging in. If I understand correctly, the remaining issue is in the Homebrew formula (if it has not been fixed already). @elgrove and @truthdoug: could you please confirm? If so, we'll close this issue.
(I cannot reproduce any of the aforementioned errors on a standard pip install pgcli
, so I strongly suspect that any remaining issue will be in the Homebrew formula and should be raised there, not here.)
Yes, confirmed. I updated pgcli to 4.0.1 and the problem is resolved. I'm ok with closing this issue (but cannot do so myself)
Description
After having upgraded to v4.0,
pgcli
command returns errorModuleNotFoundError: No module named 'six'
Solutions tried without success:
brew reinstall pgcli
brew reinstall python@3.12
brew uninstall pgcli && brew install pgcli
Your environment