-
Notifications
You must be signed in to change notification settings - Fork 51
Error when using xlsxwriter in openresty #18
Comments
Not sure but I think nginx create its own environment to each request. and do not set any variables to _G. P.S. xlsxwriter require ZipWriter module which require some libraries which it not install automatically |
@moteus There shouldn't be any global variables in the code. That is why the strict is there in the first place. @bacTlink Can you remove the If so, is there a way to Anyway, let me know and I'll push a fix.
@moteus The OP had already installed the dependencies via luarocks but ran into issue #13 and couldn't install xlsxwriter.lua. Thanks for the feedback from everyone. |
But they are exists :).
Problem that luarocks does not install all deps for ZipWriter. |
I remove it and OpenResty seems returning the correct result.
I don't know any way to do this. Can Lua check whether a module is loaded? In OpenResty "ngx" is always loaded. |
I use the following command to install xlsxwriter:
It installed successfully, but when I tried to use it, nginx report failure.
I find this in the /nginx/error.log:
It seems something wrong with /workbook.lua. I wonder how to fix it.
Thanks in advance.
The text was updated successfully, but these errors were encountered: