KeyError in thread completion_refresh
See original GitHub issueDescription
I get this error occasionally here and there. I ^C and things work again.
Exception in thread completion_refresh:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/site-packages/pgcli/completion_refresher.py", line 65, in _bg_refresh
refresher(completer, executor)
File "/usr/local/lib/python2.7/site-packages/pgcli/completion_refresher.py", line 105, in refresh_tables
completer.extend_columns(executor.table_columns(), kind='tables')
File "/usr/local/lib/python2.7/site-packages/pgcli/pgcompleter.py", line 158, in extend_columns
metadata[schema][relname][colname] = column
KeyError: u'_stmp_3fc53b90_a'
Your environment
- Please provide your OS and version information. I see it on ubuntu test server and os x machine when connecting to different databases so I think this is irrelevant
- pgcli -v Version: 1.3.1
pip freeze
https://gist.github.com/tejasmanohar/ba53787fa736c95e6e867833e08db804
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Top Results From Across the Web
"Exception in thread" error when updating key-value pair in a ...
When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on ......
Read more >Exception KeyError in module threading - Google Groups
I have a Django app running that *appears* to work fine (from a user's perspective). But the error_log is constantly filled with these...
Read more >Error Messages - SQLAlchemy 1.4 Documentation
Solution is to make sure ORM sessions if using the ORM, or engine-bound Connection objects if using Core, are explicitly closed at the...
Read more >Changelog — Python 3.11.1 documentation
Cursor.rowcount when a DML statement has run to completion. This fixes the row count for SQL queries like UPDATE ... RETURNING . Patch...
Read more >errors – Exceptions raised by the pymongo package
Raised when an insert or update fails due to a duplicate key error. exception pymongo.errors.ExceededMaxWaiters¶. Raised when a thread tries to get a ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This version of pgcli (1.10.3) is very old. Issue was fixed in 3.0.0, in https://github.com/dbcli/pgcli/pull/1145. Latest released pgcli version is 3.1.0, I’d recommend updating to that.
I just encountered a very similar issue after adding foreign keys to a partitioned table. Without the foreign keys partitioned tables work like a charm in pgcli. Turns out it can be reproduced quite easily:
Note the output doesn’t show the foreign key, where
psql
displays it: