Skip to content

Exception using add_weigh_in #283

@littleyoda

Description

@littleyoda

How to reproduce:

Use demo.py
[6] ⚖️ Body composition & weight
[4] Add weight (interactive)

Enter weight (30-300, default: 85.1): 90
Enter unit (kg/lbs, default: kg):
⚖️ Add weigh-in: 90.0 kg
❌ Error adding weigh-in result: Expected value: Row 1 Column 1 (character 0)

The cause is that a JSON response is expected in the def add_weigh_in function.
return self.garth.post(“connectapi”, url, json=payload).json()
However, the API call does not return any content.
status_code is 204 (“204 No Content”)

However, the weight is added successfully.

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