小编Cha*_*les的帖子

为什么我会收到“Traceback(最近一次调用最后一次):”错误?

我很抱歉问这个问题,但我找不到为什么会出现此错误,尤其是在程序运行之后。

准确地说,错误是:

>>> 
Welcome! This program will convert measures for you.
Select operation.
1.Miles to Kilometers
2.Fahrenheit to Celsius
3.Gallons to liters
4.Pounds to kilograms
5.Inches to centimeters
Enter your choice by number: 1
Traceback (most recent call last):
  File "C:\Users\Levhitor\Downloads\Mario_Gomez_Lab2.py", line 112, in <module>
    intro()
  File "C:\Users\Levhitor\Downloads\Mario_Gomez_Lab2.py", line 12, in intro
    main()
  File "C:\Users\Levhitor\Downloads\Mario_Gomez_Lab2.py", line 25, in main
    convertMK()
  File "C:\Users\Levhitor\Downloads\Mario_Gomez_Lab2.py", line 44, in convertMK
    input_M = float(raw_input(("Miles: ")))
TypeError: 'int' object is not callable
Run Code Online (Sandbox Code Playgroud)

我不明白这里发生了什么事。谁能帮我?

raw_input = 0 …
Run Code Online (Sandbox Code Playgroud)

python

5
推荐指数
1
解决办法
12万
查看次数

标签 统计

python ×1