Skip to content

debug log enabled by default with hardcoded path #1

@skochinsky

Description

@skochinsky

After installing, I've got this stack trace:

C:\Users\Igor\AppData\Roaming\Hex-Rays\IDA Pro\plugins\ida-chat\ida_chat_plugin.py: [Errno 2] No such file or directory: 'C:\\tmp\\ida-chat.log'
Traceback (most recent call last):
  File "C:\Program Files\IDA Professional 9.2\python\ida_idaapi.py", line 502, in IDAPython_ExecScript
    exec(code, g)
  File "C:/Users/Igor/AppData/Roaming/Hex-Rays/IDA Pro/plugins/ida-chat/ida_chat_plugin.py", line 44, in <module>
    from ida_chat_core import IDAChatCore, ChatCallback, test_claude_connection
  File "C:\Users\Igor\AppData\Roaming\Hex-Rays\IDA Pro\plugins\ida-chat\ida_chat_core.py", line 29, in <module>
    logging.FileHandler(LOG_FILE, mode="a"),
  File "C:\Python310\Lib\logging\__init__.py", line 1169, in __init__
    StreamHandler.__init__(self, self._open())
  File "C:\Python310\Lib\logging\__init__.py", line 1201, in _open
    return open_func(self.baseFilename, self.mode,
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\tmp\\ida-chat.log'

It seems that LOG_FILE is hardcoded to "/tmp/ida-chat.log" and enabled by default. It should probably use a system-specific path and maybe enabled via a setting.

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