khoj-ai / khoj

Your AI second brain. Get answers to your questions, whether they be online or in your own notes. Use online AI models (e.g gpt4) or private, local LLMs (e.g llama3). Self-host locally or use our cloud instance. Access from Obsidian, Emacs, Desktop app, Web or Whatsapp.
https://khoj.dev
GNU Affero General Public License v3.0
12.64k stars 640 forks source link

Plugin fails to install #485

Closed felipemeres closed 12 months ago

felipemeres commented 12 months ago

I'm running an instance of the latest docker image and upon pointing the Obsidian plugin to the container url the config begins but has a couple of plugin fails:

           ERROR    🚨 Failed to setup Plugin: unsupported        indexer.py:390
                    operand type(s) for 'in': 'str' and                         
                    'EnumMeta'                                                  
                    ╭──── Traceback (most recent call last) ────╮               
                    │ /usr/local/lib/python3.10/dist-packages/k │               
                    │ hoj/routers/indexer.py:375 in             │               
                    │ configure_content                         │               
                    │                                           │               
                    │   372 │                                   │               
                    │   373 │   try:                            │               
                    │   374 │   │   # Initialize External Plugi │               
                    │ ❱ 375 │   │   if (t == None or t in state │               
                    │       search_models.text_search:          │               
                    │   376 │   │   │   logger.info("🔌 Setting │               
                    │   377 │   │   │   content_index.plugins = │               
                    │   378 │   │   │   for plugin_type, plugin │               
                    │                                           │               
                    │ /usr/lib/python3.10/enum.py:405 in        │               
                    │ __contains__                              │               
                    │                                           │               
                    │    402 │   │   │   │   │   DeprecationWar │               
                    │    403 │   │   │   │   │   stacklevel=2,  │               
                    │    404 │   │   │   │   │   )              │               
                    │ ❱  405 │   │   │   raise TypeError(       │               
                    │    406 │   │   │   │   "unsupported opera │               
                    │    407 │   │   │   │   │   type(obj).__qu │               
                    │    408 │   │   return isinstance(obj, cls │               
                    ╰───────────────────────────────────────────╯               
                    TypeError: unsupported operand type(s) for                  
                    'in': 'str' and 'EnumMeta'  

Obsidian is running on another computer on my network. Does the plugin handle file transfer or do I need to bind the Obsidian path to the Docker container?

sabaimran commented 12 months ago

Thanks for reporting, @felipemeres -- I was able to reproduce the error; working on a fix.

sabaimran commented 12 months ago

This should be addressed with 5e16074