Emmy-love-api icon indicating copy to clipboard operation
Emmy-love-api copied to clipboard

Error when running genEmmyAPI

Open emiliakaida opened this issue 4 years ago • 5 comments

I encountered this error message when issuing the command "lua genEmmyAPI.lua":

lua: genEmmyAPI.lua:118: attempt to concatenate a nil value (field 'name')
stack traceback:
        genEmmyAPI.lua:118: in upvalue 'genModule'
        genEmmyAPI.lua:136: in local 'genModule'
        genEmmyAPI.lua:149: in main chunk
        [C]: in ?

although I followed exactly the steps in the README. I'm currently on Windows 10 64bit. Do you have any idea how to fix this? Thanks in advance.

emiliakaida avatar Dec 31 '20 10:12 emiliakaida

Seems I've found a reason. But while I don't know how to fix it. It relates to module types. For example take Audio module. There're 2 types. But when script is running there're 3 types:

  • the table from RecordingDevice.lua
  • the table from Source.lua
  • .\modules\audio\types\Source.lua (just a string — path to Source.lua)

I don't know how .\modules\audio\types\Source.lua has appeared there but it's strange.

ISTAnsver avatar Jan 12 '21 06:01 ISTAnsver

I'm still having this issue. Any progress?

michaelslec avatar Mar 29 '21 10:03 michaelslec

Maybe you can try #12? But #12 is more specific to the Lua language server on VS Code, so maybe the generated code is less useful for other EmmyLua plugins...

ImpleLee avatar Apr 30 '21 13:04 ImpleLee

Issue still happening in W11 64bit.

The thing is that the API has evolved while the script has not.

Unfortunately I'm not able to fix that right now, otherwise would be already working on that.

igorr0driguez avatar Jan 20 '23 19:01 igorr0driguez

hope you can find the time at some point

Ahri-Spica avatar Jul 03 '23 09:07 Ahri-Spica