Skip to content

Getting error 'Unable to open log file' when log file move to other directory other than default #245

@ramananayak

Description

@ramananayak

I moved both log and history files inside .cache directory.
and updated both the file path as below in the config file

log_file = ~/.cache/litecli/log
history_file = ~/.cache/litecli/history

Now when I start litecli, it doesn't recognise the only log file and give below error

➜ ❯ litecli -l ~/.cache/litecli/log test.db
Error: Unable to open the log file "~/.cache/litecli/log".
LiteCli: 1.17.0 (SQLite: 3.51.2)
GitHub: https://github.com/dbcli/litecli
Failed to get function names.
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/litecli/1.17.0/libexec/lib/python3.14/site-packages/litecli/sqlcompleter.py", line 371, in extend_functions
    func_data = [self.escaped_names(d) for d in func_data]
                                                ^^^^^^^^^
  File "/opt/homebrew/Cellar/litecli/1.17.0/libexec/lib/python3.14/site-packages/litecli/sqlexecute.py", line 213, in functions
    cur.execute(self.functions_query % self.dbname)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: no such table: INFORMATION_SCHEMA.ROUTINES

If I move it back to default location this error will go.

file has both rw and permission to user

-rw-r--r--@ 1 ram  staff  1049 29 Jan 23:28 history
-rw-r--r--@ 1 ram  staff   437 29 Jan 23:28 log

I am using MacBook.
litecli, version 1.17.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions