Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

344
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!