Skip to content

when insert to table t(t text) , raise an exception #155

Closed

Description

@one-pyy

create table t(t text);

Then type insert into t values( (not copy)

Unhandled exception in event loop:
  File "D:\Miniconda3\lib\site-packages\prompt_toolkit\buffer.py", line 1939, in new_coroutine
    await coroutine(*a, **kw)
  File "D:\Miniconda3\lib\site-packages\prompt_toolkit\buffer.py", line 1763, in async_completer
    async for completion in async_generator:
  File "D:\Miniconda3\lib\site-packages\prompt_toolkit\completion\base.py", line 326, in get_completions_async
    async for completion in completer.get_completions_async(
  File "D:\Miniconda3\lib\site-packages\prompt_toolkit\completion\base.py", line 326, in get_completions_async
    async for completion in completer.get_completions_async(
  File "D:\Miniconda3\lib\site-packages\prompt_toolkit\completion\base.py", line 202, in get_completions_async
    for item in self.get_completions(document, complete_event):
  File "D:\Miniconda3\lib\site-packages\litecli\sqlcompleter.py", line 468, in get_completions
    cols = self.find_matches(word_before_cursor, scoped_cols)
  File "D:\Miniconda3\lib\site-packages\litecli\sqlcompleter.py", line 421, in find_matches
    for item in sorted(collection):

Exception '<' not supported between instances of 'NoneType' and 'str'
Press ENTER to continue...

when create table q(a text);, it works great.

maybe it's because the same table name and column name

Activity

  1. amjith commented on Jan 23, 2025

    @amjith
    Member

    This was an interesting bug. If a table had a column with the same name then it resulted in this crash. It was a good find. Now fixed in v1.14.0. Thanks for reporting it. 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions