Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

346
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda