KoboldAI-Client icon indicating copy to clipboard operation
KoboldAI-Client copied to clipboard

"Please install lupa=1.10. You have lupa 1.10." and "'NoneType' object has no attribute 'obliterate_multiverse'"

Open bbergeron0 opened this issue 2 years ago • 3 comments

Have a look at this:

-> % git clone https://github.com/koboldai/KoboldAI-Client
(ok)
-> % pip install --user -r requirements.txt
(Some installed, some already installed via Gentoo's package manager)
-> % ./aiserver.py (or python aiserver.py)
ERROR      | __main__:<module>:75 - Please install lupa==1.10. You have lupa 1.10.
INIT       | Starting   | Flask
INIT       | OK         | Flask
INIT       | Starting   | Webserver
INIT       | Starting   | LUA bridge
ERROR!
Traceback (most recent call last):
  File "/home/grwth0/Softwares/KoboldAI-Client/./aiserver.py", line 2941, in lua_startup
    vars.lua_kobold, vars.lua_koboldcore, vars.lua_koboldbridge = vars.lua_state.globals().dofile("bridge.lua")(
  File "lupa/_lupa.pyx", line 587, in lupa._lupa._LuaObject.__call__
  File "lupa/_lupa.pyx", line 1333, in lupa._lupa.call_lua
  File "lupa/_lupa.pyx", line 1359, in lupa._lupa.execute_lua_call
  File "lupa/_lupa.pyx", line 1295, in lupa._lupa.raise_lua_error
lupa._lupa.LuaError: bridge.lua:1790: attempt to index global 'utf8' (a nil value)
stack traceback:
    bridge.lua:1790: in function <bridge.lua:7>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/grwth0/Softwares/KoboldAI-Client/./aiserver.py", line 10217, in <module>
    load_model(initial_load=True)
  File "/home/grwth0/Softwares/KoboldAI-Client/./aiserver.py", line 2817, in load_model
    lua_startup()
  File "/home/grwth0/Softwares/KoboldAI-Client/./aiserver.py", line 2947, in lua_startup
    vars.lua_koboldbridge.obliterate_multiverse()
AttributeError: 'NoneType' object has no attribute 'obliterate_multiverse'

Please install lupa=1.10. You have lupa 1.10.. That's bad. 'NoneType' object has no attribute 'obliterate_multiverse'. That sounds even worst!

What's going on?

bbergeron0 avatar Feb 13 '23 19:02 bbergeron0

The requirements.txt file is meant for colab, for the best results use our play.sh and install_requirements.sh files.

henk717 avatar Feb 13 '23 20:02 henk717

I'm looking to run this notebook which uses koboldai-client, but I have several objections regarding the packaging in general, so I want to run it locally instead.

The notebook executes python3 aiserver.py --noaimenu --host --port 80808 --model {model_name} --revision {branch_name} --nobreakmodel --lowmem --quiet to start koboldai-client, but simply running aiserver.py locally give me the aforementioned errors.

After some digging, I noticed that play.sh feeds back its arguments to aiserverver.py, so I can dismiss my issue for now. However, I'm still interested in solving these issues so I can eventually repackage the notebook and rely on system packages instead of micromamba. What's the current status of running koboldai locally? Can you pass me some pointers on that subject or regarding these errors?

bbergeron0 avatar Feb 14 '23 19:02 bbergeron0

It seems, KoboldAI requires Lua 5.3+ because of utf8 module, but lupa==1.10 provides only Lua 5.1

$ python3 -c 'import lupa; lua = lupa.LuaRuntime(unpack_returned_tuples=True); print(lua.eval("_VERSION"))'
Lua 5.1

I solve this problem by installing the latest version of lupa

$ pip3 uninstall lupa
$ pip3 install lupa
$ python3 -c 'import lupa; lua = lupa.LuaRuntime(unpack_returned_tuples=True); print(lua.eval("_VERSION"))'
Lua 5.4

Now KoboldAI runs fine

sasha0552 avatar Mar 08 '23 19:03 sasha0552