Error while converting Caffe to mxnet

I am trying to convert a Caffe model to mxnet, but I get a error as below:

Traceback (most recent call last):
  File "", line 232, in <module>
  File "", line 228, in main
    convert_model(args.prototxt, args.caffemodel, args.save_model_name)
  File "", line 65, in convert_model
    sym, input_dim = convert_symbol(prototxt_fname)
  File "incubator-mxnet/tools/caffe_converter/", line 316, in convert_symbol
    sym, output_name, input_dim = _parse_proto(prototxt_fname)
  File "incubator-mxnet/tools/caffe_converter/", line 254, in _parse_proto
    param_string = "shape=(%s)" % (','.join(param.shape.dim),)
TypeError: sequence item 0: expected str instance, int found

Related code snippet in the script is:

 if layer.type == 'Reshape': 
    type_string = 'mx.symbol.Reshape' 
    need_flatten[name] = False 
    param = layer.reshape_param  
    param_string = "shape=(%s)" % (','.join(param.shape.dim),) 

And the reshape_param in the prototxt is:

  reshape_param {
    shape {
      dim: 0
      dim: 2
      dim: 1
      dim: -1

Then I modify the code from

param_string = "shape=(%s)" % (','.join(param.shape.dim),)


param_string = "shape=(%s)" % (','.join(str(v) for v in param.shape.dim),)

The symbol file is created successfully but I get another error:

[1]    141655 abort (core dumped)  python SD.prototxt SD.caffemodel

The error is caused by
arg_shapes, _, aux_shapes = sym.infer_shape(data=tuple(input_dim))

What should I do?