Skip to content

JSONDecodeError #1

@happysoulvenky

Description

@happysoulvenky

I cloned and started the server ,
@app.route('/', methods = ['GET','POST'])
def index():
data = requests.get('https://employee-data-platform.vercel.app/api/fetchall')
response = data.json()
# Execute query to select all records from payroll table
#https://employee-data-platform.vercel.app/api/fetchall

This suggests that data is an object returned from a requests call, and calling .json() on it is causing the JSONDecodeError because the response body is not valid JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions