Program to convert number from any base to decimal I have made a script to convert number from any base to decimal.

I am trying to optimize the code because I think it is bloated and can be improved but if I change anything it affects error handling negatively. 
I tried removing the two while loops but then the user would need to enter their number again even if they only messed up their base that is something I want to avoid.

I think printing and handling the number can be optimized but I just cannot see how. Also if anyone can help me improve my code readability that would be helpful too.

while True: #Main loop will keep the script running until user exits
    negative_flag=False #flag to check if a value is negative or not. False by default
    while True: # Loop made so that any error can be handled if input is not number
        number=input("Enter a number : ")
        try:
            if type(int(number))==int:
                break
        except:
             print("Wrong input. Only integers are allowed.")
             continue

    while True: # Loop made so that any error can be handled if input is not number
        base_from=input("Enter the base number is in : ")
        try:
            if type(int(base_from))==int and int(base_from)&gt;=2:
                break
            else:
                print("Base should be greater than or equal to 2")
        except:
             print("Wrong input. Only integers are allowed.")
             continue

    if int(number)&lt;0: #Check if a number is negative if it is convert it into a postive
        (number)=int(number)*-1
        negative_flag=True
    number=str(number)
 #Not useful just for reference base_to=10

    number_size=len(number)
    number_holder=0

    for x in number: #Basic conversion of a number to decimal number system.
        number_size-=1
        base_raised=int(base_from)**number_size
        number_multiplied=base_raised*int(x)
        number_holder=number_holder+number_multiplied


    if negative_flag==True: # Prints if the value is -ve
        print( number_holder*-1 )
    else:
        print(number_holder)

    while True:  # Final loop asking users if they want to exit or not
        response=input("Do you want to continue?(y or n) - ")
        if response=='n' or response=='y':
            break
        else:
            print("Wrong input")
            continue
    if response == 'n': # Conditions for only two valid answer.
        break
    elif response == 'y':
        continue
PEP-8
The Style Guide for Python Code has many recommendations for the formatting of Python code that all developers should (must!) follow.  These include

single blank space around binary operators, eg negative_flag = False, not negative_flag=False
no blanks after ( or before ), eg print(number_holder * -1) not print( number_holder*-1 )

Useless code
int(number) can only ever return an int, or raise an exception.  There are no other possibilities.  So if no exception is raised, the if condition will always be true, making the if statement an unnecessary control structure:
try:
    if type(int(number)) == int:
        ...
except:
    ...

Similarly you only exit this loop if response == 'n' or response == 'y'
while True:
    response = input(&quot;Do you want to continue?(y or n) - &quot;)
    if response=='n' or response=='y':
        break
    else:
        print(&quot;Wrong input&quot;)
        continue

So why test both possibilities?
if response == 'n': # Conditions for only two valid answer.
    break
elif response == 'y':
    continue

From the comment, it seems you have already realized this.  So why elif response == 'y':?  Why not simple else:?
Finally, every last one of the continue statements is used as the last statement in a control structure, in a loop.  Without the continue statement, the loop would be restarting anyway, so these can all be omitted.
Only catch the exceptions you expect
Consider this code:
while True:
    number = input(&quot;Enter a number : &quot;)
    try:
        if type(int(number)) == int:
            break
    except:
         print(&quot;Wrong input. Only integers are allowed.&quot;)
         continue

Try pressing Control-C at the input prompt to quit the program.  Whoops!  Why isn't the program terminating?  Because Control-C raises the KeyboardInterrupt exception, which you catch, display an inappropriate error messages, and then loop back for another try.  How unexpected.
You want to catch ValueError exceptions, only.
while True:
    try:
        number = int(input(&quot;Enter a number: &quot;))
        break
    except ValueError:
        print(&quot;Wrong input.  Only integers are allowed.&quot;)

Note the absence of useless if statements and continue statements.
Any Base?
Your program is supposed to convert from &quot;any base&quot; to decimal.  But really, you only allow base 2 through base 10 input.  You don't allow FF to be converted from base 16 to base 10.
To Base 10
You've got a lot of code to convert a number to base 10.  This functionality is built-in to Python.  If your intention is not reinventing-the-wheel, you should use the int(x, base=10) function.
Reworked Code
while True:

    number = input(&quot;Enter a number: &quot;)

    while True:
        try:
            base = int(input(&quot;Enter the base the number is in: &quot;))
            if base &gt;= 2:
                break
            print(&quot;Base should be greater than or equal to 2&quot;)
        except ValueError:
            print(&quot;Wrong input.  Only integers are allowed&quot;)

    try:
        print(int(number, base))
    except ValueError:
        print(f&quot;Unable to convert {number!r} to base {base}&quot;)

    while True:
        response = input(&quot;Do you want to continue? (y or n): &quot;)
        if response in {'y', 'n'}:
            break
        print(&quot;Wrong input&quot;)

    if response == 'n':
        break

Or super condensed:
print(&quot;Press Control-C to stop.&quot;)
while True:
    try:
        print(int(input(&quot;Number: &quot;), int(input(&quot;Base: &quot;))))
    except ValueError as err:
        print(&quot;Invalid input:&quot;, err)
    except KeyboardInterrupt:
        print(&quot;Conversions to base-10 complete.&quot;)
        break