Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

345
Visualizações
AttributeError: 'tuple' object has no attribute 'get' while using POST request in Postman

I'm trying to use request.get_json() to add nodes from JSON data to a set.

@app.route('/connect_node', methods = ['POST'])

def connect_node():
    json = request.get_json()
    nodes = json.get('nodes')              
    if nodes is None:
        return "No node", 400 

The snapshot of the Postman POST request

The error I'm getting in Spyder(Python 3.9):

line 178, in connect_node
nodes = json.get(nodes)
AttributeError: 'tuple' object has no attribute 'get' 
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

I'm assuming your going though the udemy blockchain course, turns out its just a problem with the postman check this out Flask app request.get_json() return (Ellipsis, Ellipsis) instead of json

about 4 years ago · Juan Pablo Isaza Relatório

0

If you are using python 3.9 and getting this error then Build a virtual environment in anaconda with python 3.6 and use this python interpreter for all Spyder consoles. It worked in my case.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda