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

Exception in thread completion_refresh #1184

Open
julianodba opened this issue May 19, 2020 · 1 comment
Open

Exception in thread completion_refresh #1184

julianodba opened this issue May 19, 2020 · 1 comment

Comments

@julianodba
Copy link

@julianodba julianodba commented May 19, 2020

How can I fix this message, please?

pgcli -h localhost -U juliano -d postgres
postgres> Exception in thread completion_refresh:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in runs-mode Refreshing completions...
self._target(self._args, *self._kwargs)
File "/usr/share/pgcli/pgcli/completion_refresher.py", line 65, in _bg_refresh
refresher(completer, executor)
File "/usr/share/pgcli/pgcli/completion_refresher.py", line 110, in refresh_tables
completer.extend_foreignkeys(executor.foreignkeys())
File "/usr/share/pgcli/pgcli/pgcompleter.py", line 278, in extend_foreignkeys
childcolmeta = meta[childschema][childtable][childcol]
KeyError: 'my_partitioned_table'
pgcli -v
Version: 2.2.0
cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
SELECT VERSION();
PostgreSQL 11.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36), 64-bit
python3 --version
Python 3.8.2
@catherinedevlin
Copy link
Contributor

@catherinedevlin catherinedevlin commented Jul 26, 2020

I haven't worked on the completer, but that looks as though the data dictionary somehow changed while your pgcli instance was still starting up. (Or maybe some kind of race condition bug?)

Is it a persistent problem? Does it happen every time, or just sometimes? Does it persist after you restart pgcli, restart postgresql, or restart the server?

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.