Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad argument #1 to 'concat' (table expected, got nil) #4

Closed
zhezi7 opened this issue May 17, 2018 · 7 comments
Closed

bad argument #1 to 'concat' (table expected, got nil) #4

zhezi7 opened this issue May 17, 2018 · 7 comments

Comments

@zhezi7
Copy link

zhezi7 commented May 17, 2018

maxminddb.lua:323: bad argument #1 to 'concat' (table expected, got nil)
stack traceback:
coroutine 0:
[C]: in function 'concat'
/Users/suriko/apps/openresty/lualib/resty/maxminddb.lua:323: in function 'lookup'

@anjia0532
Copy link
Owner

share your code plz.

@anjia0532
Copy link
Owner

local _,status,resultTap = _dump_entry_data_list(entry_data_list)
if status ~= MMDB_SUCCESS then
return nil,'no data'
end
return json_decode(table.concat(resultTab)),nil

@zhezi7
Copy link
Author

zhezi7 commented May 18, 2018

image

please see the picture

@anjia0532
Copy link
Owner

@anjia0532
Copy link
Owner

  1. install all of the prerequisites https://github.com/anjia0532/lua-resty-maxminddb#prerequisites
  2. maxminddb's version
  3. invoke code

@zhezi7
Copy link
Author

zhezi7 commented May 18, 2018

I find what I changed, when it loaded, it shows an error about maxminddb,
maxminddb.lua:151: dlopen(libmaxminddb.so, 5): image not found
So I changed from
local maxm = ffi.load('libmaxminddb.so') to
local maxm = ffi.load('libmaxminddb.dylib')
Maybe that's the reason.

I use Mac, do you know why it shows the error:
maxminddb.lua:151: dlopen(libmaxminddb.so, 5): image not found

@anjia0532
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants