mongodb-labs / mongorover

Intern project - MongoDB driver for the Lua programming language - This Repository is NOT a supported MongoDB product
Apache License 2.0
55 stars 10 forks source link

mongorover/MongoCollection.lua:137: value at index 3 is not a table #80

Closed hololoev closed 7 years ago

hololoev commented 7 years ago

The issue is in current master. Luarocks version is ok.

Code:

local config = require('libs.config') local MongoClient = require("mongorover.MongoClient") local luaBSONObjects = require("mongorover.luaBSONObjects") local _client = MongoClient.new(config.mongo.url) local _database = _client:getDatabase(config.mongo.db) local _websites = _database:getCollection('sites') local _data = _websites:find({url = 'example.com'}) << error here

Full console log:

lua: /usr/share/lua/5.1/mongorover/MongoCollection.lua:137: value at index 3 is not a table stack traceback: C: in function 'collection_find' /usr/share/lua/5.1/mongorover/MongoCollection.lua:137: in function 'find' info.lua:28: in main chunk

hololoev commented 7 years ago

Sorry guys. It's a mistake. Problem was in my centos.