try:
with urllib.request.urlopen(api_url) as response:
data=json.loads(response.read().decode())
print(json.dumps(data, indent = 4 ))
except Exception as e :
print(f"error reading data : {e} ")
return {"statuscode":"500","body":"Error fetching data"}
games_messages = [game_format(game) for game in data]
"errorMessage": "'NoneType' object is not iterable",
"errorType": "TypeError",
"requestId": "11a9a46e-3abe-4f6e-8c38-278c0697238a",
"stackTrace": [
" File \"/var/task/lambda_function.py\", line 69, in lambda_handler\n games_messages = [game_format(game) for game in data]\n",
" File \"/var/task/lambda_function.py\", line 15, in game_format\n quarter_scores = ', '.join([f\"Q{q['Number']}: {q.get('AwayScore', 'N/A')}-{q.get('HomeScore', 'N/A')}\" for q in quarters])\n"
]
}
это лямбда-функция aws [code] try: with urllib.request.urlopen(api_url) as response: data=json.loads(response.read().decode()) print(json.dumps(data, indent = 4 )) except Exception as e : print(f"error reading data : {e} ") return {"statuscode":"500","body":"Error fetching data"}
games_messages = [game_format(game) for game in data] [/code] ошибка, которую я получаю: [code] "errorMessage": "'NoneType' object is not iterable", "errorType": "TypeError", "requestId": "11a9a46e-3abe-4f6e-8c38-278c0697238a", "stackTrace": [ " File \"/var/task/lambda_function.py\", line 69, in lambda_handler\n games_messages = [game_format(game) for game in data]\n", " File \"/var/task/lambda_function.py\", line 15, in game_format\n quarter_scores = ', '.join([f\"Q{q['Number']}: {q.get('AwayScore', 'N/A')}-{q.get('HomeScore', 'N/A')}\" for q in quarters])\n" ] } [/code] данные, которые я получил: [img]https://i.sstatic.net /65NbzHfB.png[/img]
I am installing pluGET to automatically manage all of my plugins. Link Here ( I installed all of the requirements and libraries. Still, It Doesnt Work. Full Error Log =>
У меня уже давно возникают проблемы с платформой Autogen, я следил за руководствами YouTube, документацией Autogen, выполнил необходимые установки и все еще получаю ту же ошибку TypeError: объект «NoneType» не повторяется. это мои коды, которые я...
У меня уже давно возникают проблемы с платформой Autogen, я следил за руководствами YouTube, документацией Autogen, выполнил необходимые установки и все еще получаю ту же ошибку TypeError: объект «NoneType» не повторяется. Это код, который я...
Я пытаюсь изменить пакет Python scqubits, чтобы использовать JAX custom_vjp для дифференцируемого программирования. При этом я столкнулся со следующей ошибкой:
TypeError: объект «Добавить» не повторяется
Вот минимальный пример, воспроизводящий...