Skip to content

Error on startup #10

@apper13

Description

@apper13

Hi, I really like your project. I have an issues with the code:

On line 72 of thinq2/model/thinq.py I get the following error: AttributeError: 'dict' object has no attribute 'device_type'. Accessing item.device_type does not work for me. item['device_type'] or item.get("device_type", {}) works, but than the result of this line (device_schema) is not able to load the snapshop in the next line... Even if it seems like it gets the current schema (LaundryDevice).

The error when calling device_schema.load() is: AttributeError: 'dict' object has no attribute 'snapshot'. Of course there is no attribute snapshot if you are accessing only the snapshop part of data. So I thought I would change it to just use data, but then I get the next error: marshmallow.exceptions.ValidationError: {'result': {'item': {0: {'washerDryer': ['Missing data for required field.'], 'timestamp': ['Missing data for required field.'], 'static': ['Missing data for required field.']}}}}.

Maybe you can help?!

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