[英]Receiving tab error “inconsistent use of tabs and spaces in indentation” even after converting from spaces to tabs in visual studio code
我不断从我的应用程序中收到此错误:
文件“”,第 67 行
for o in obj["physical_address"]:
^
TabError:缩进中制表符和空格的使用不一致
这是我的代码:
@app.route('/location')
def get_testing_location():
"""Return selected state from drop down menu"""
state = request.args['testing-state']
url = f'https://covid-19-testing.github.io/locations/{state.lower()}/complete.json'
res = requests.get(url)
data = res.json()
for obj in data:
if obj["physical_address"]:
for o in obj["physical_address"]:
add=o["address_1"]
state=o["city"]
print(f'{add} {state}')
import pdb
pdb.set_trace()
我已将我的 Visual Studio 代码编辑器转换为使用制表符而不是空格,但我仍然收到相同的错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.