help to find the problem in a python code

Hi, I’m beginner with python programming and I am trying a code given by my supervisor. I am bloqued in this error and I don’t know haw to localize it and fix it .

Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 18:50:55) [MSC v.1915 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 7.2.0 -- An enhanced Interactive Python.

runfile('D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source/train_custom.py', wdir='D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source')
Using TensorFlow backend.
D:\kawther\my_python_scripts\SujetChiffres\SujetChiffres\Code_source
Build text image generator
Build image list...
0it [00:00, ?it/s]
Split train/val set
#0 training samples before |#0 validation samples
#0 training samples | #0 validation samples
Building model...
Traceback (most recent call last):

  File "<ipython-input-1-1da88fdf4160>", line 1, in <module>
    runfile('D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source/train_custom.py', wdir='D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source')

  File "C:\Users\kawther\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile
    execfile(filename, namespace)

  File "C:\Users\kawther\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source/train_custom.py", line 332, in <module>
    **kwargs

  File "D:/kawther/my_python_scripts/SujetChiffres/SujetChiffres/Code_source/train_custom.py", line 195, in train
    model, test_func, model_cb = custom_model.get_model(type_model,input_shape,(max_str_len,len(alphabet)), img_gen, **kwargs)

  File "D:\kawther\my_python_scripts\SujetChiffres\SujetChiffres\Code_source\custom_model.py", line 72, in get_model
    return Model_Dummy(input_shape, output_shape)

  File "D:\kawther\my_python_scripts\SujetChiffres\SujetChiffres\Code_source\custom_model.py", line 624, in Model_Dummy
    input_data_rs = Reshape(target_shape=rs_shape)(input_data)

  File "C:\Users\kawther\Anaconda3\lib\site-packages\keras\engine\topology.py", line 603, in __call__
    output = self.call(inputs, **kwargs)

  File "C:\Users\kawther\Anaconda3\lib\site-packages\keras\layers\core.py", line 393, in call
    return K.reshape(inputs, (K.shape(inputs)[0],) + self.target_shape)

  File "C:\Users\kawther\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 1776, in reshape
    return tf.reshape(x, shape)

  File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 6481, in reshape
    "Reshape", tensor=tensor, shape=shape, name=name)

  File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 513, in _apply_op_helper
    raise err

  File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 510, in _apply_op_helper
    preferred_dtype=default_dtype)

  File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1146, in internal_convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)

  File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 971, in _autopacking_conversion_function
    return _autopacking_helper(v, dtype, name or "packed")

  File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 922, in _autopacking_helper
    constant_op.constant(elem, dtype=dtype, name=str(i)))

  File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 208, in constant
    value, dtype=dtype, shape=shape, verify_shape=verify_shape))

  File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 442, in make_tensor_proto
    _AssertCompatible(values, dtype)

  File "C:\Users\kawther\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 353, in _AssertCompatible
    (dtype.name, repr(mismatch), type(mismatch). __name__ ))

TypeError: Expected int32, got 31.0 of type 'float' instead.

The last line of the output is clear:

TypeError: Expected int32, got 31.0 of type 'float' instead.

Maybe you had change a int value with float value inside the code of your supervisor.

This is the only help I can give with this output error.

-Gabriele-