You can't convert a type to an int.
Int is a type in python. Please refer to this article:
https://www.w3schools.com/python/python_datatypes.asp
Types are different variations of data, like String, Integer, Dictionary, etc.
If you try to mutate a type into an int you are going to encounter errors since it's like turning the enveloping feature into a subset.
Please be more clear on what the actual scenario is and we can help you. Giving us just the error without context won't help.