Skip to content

protobuf/init.lua:669: bad argument #1 to 'ReadTag' (string expected, got userdata) #3

@arashno

Description

@arashno

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions