lute-v3 icon indicating copy to clipboard operation
lute-v3 copied to clipboard

Launch of fresh install fails if mecab is not installed

Open abartov opened this issue 8 months ago • 1 comments

Description

Launch of fresh install fails if mecab is not installed. installing the mecab module resolve the problem, but if lute depends on mecab, it should be marked as a dependency so that it is installed.

To Reproduce

Steps to reproduce the behavior, e.g.:

  1. Start a fresh virtualenv
  2. Install lute using pip
  3. Launch lute
  4. See error:
$ lute
  
  Starting Lute version 3.10.1.
  
  Using default config
  
  Using new production config.
  
    data path: /home/asaf/.local/share/Lute3
    database:  /home/asaf/.local/share/Lute3/lute.db
  
  Initializing app.
  Initializing parsers from plugins ...
  Enabled parsers:
    * Space Delimited
    * Turkish
    * Japanese
    * Classical Chinese
  Loading demo data.

--------------------------------------------------
Error during startup:
Type: <class 'natto.api.MeCabError'>
MECAB_NBEST request type is not set

Please check your setup and try again.
Ask for help on Discord, or report an issue on GitHub.
Additionally, help is available with --help.
--------------------------------------------------

abartov avatar Apr 01 '25 08:04 abartov

Ah such a drag. MeCab actually is not, or should not be, a required dependency ... it runs on my mac and on github ci without mecab, but the Lute code for it is kind of messy. I did the best I could and yet problems occasionally appear, like this one. Sorry for the hassle.

I'll need to re-investigate the mecab-related code, and see if there's a better way to handle it. Cheers!

jzohrab avatar Apr 11 '25 21:04 jzohrab