-
Notifications
You must be signed in to change notification settings - Fork 15
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
protobuf/init.lua:669: bad argument #1 to 'ReadTag' (string expected, got userdata) #3
Comments
Looks like you are passing a value of type |
That's true. |
There's nothing built into Lua unfortunately. I think the quickest way would be something like:
Found it on here: http://lua-users.org/lists/lua-l/2002-03/msg00166.html |
I tried that, it works but it makes my program very slow. This is my prototxt file: message Record{ optional int32 channels = 1; The problem is about 'data' field. |
Hi all,
I have an LMDB which is created in python.
Each record is a protobuffer message.
I am trying to decode the messages by doing this:
key,value=cursor:get() local record = Record_pb.Record() record:ParseFromString(value)
The 'value' is a Tensor of Bytes.
and it gives me the following error. What should I do?
.../install/bin/luajit: .../torch/install/share/lua/5.1/protobuf/init.lua:669: bad argument #1 to 'ReadTag' (string expected, got userdata)
stack traceback:
[C]: in function 'ReadTag'
.../torch/install/share/lua/5.1/protobuf/init.lua:669: in function '_internal_parse'
.../torch/install/share/lua/5.1/protobuf/init.lua:687: in function 'merge_from_string'
.../torch/install/share/lua/5.1/protobuf/init.lua:696: in function 'ParseFromString'
LuaRead.lua:17: in main chunk
[C]: in function 'dofile'
...ouzz/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00405800
The text was updated successfully, but these errors were encountered: