Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

__repr__ of types Folder and Sheet returns TypeError #169

@neelakantankk

Description

@neelakantankk

I'm working with the SDK in a REPL, to get some familiarity with it and run some quick steps. Trying to print out or see an item of type Folder or Sheet returns TypeError: Object of type Sheet is not JSON serializable or TypeError: Object of type Folder is not JSON serializable

Example traceback:

Traceback (most recent call last):
    File "<input>", line 1, in <module>
        b.sheets.to_list
    File "<<DIR>>\.virtualenv\lib\site-packages\smartsheet\types.py", line 103, in __repr__
        tmp = json.dumps(self.__store)
    File "<<USER>>\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 231, in dumps
        return _default_encoder.encode(obj)
    File "<<USER>>\AppData\Local\Programs\Python\Python39\lib\json\encoder.py", line 199, in encode
        chunks = self.iterencode(o, _one_shot=True)
    File "<<USER>>\AppData\Local\Programs\Python\Python39\lib\json\encoder.py", line 257, in iterencode
        return _iterencode(o, 0)
    File "<<USER>>\AppData\Local\Programs\Python\Python39\lib\json\encoder.py", line 179, in default
        raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Sheet is not JSON serializable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions