Skip to content

State property of the track causes attribute error on track object #67

@Lunga001

Description

@Lunga001

Title: Attribute error state on track after track has been posted

Issue found of: May 11th, 2021

Endpoint(s):

  • POST /tracks/{track_id}

Scope(s):

  • None (application is not using authentication i.e., implicit flow)

Steps to reproduce:

from soundcloud import Client
client = Client(
                client_id=SOUNDCLOUD_APP_KEY_ID,
                client_secret=SOUNDCLOUD_APP_KEY_SECRET,
                username=SOUNDCLOUD_USERNAME,
                password=SOUNDCLOUD_PASSWORD,
            )
 
track = client.post(
                    "/tracks",
                    track={
                        "title": title,
                        "description": "description",
                        "sharing": "public",
                        "asset_data": file_handle,
                        "license": "cc-by",
                        "artwork_data": open(SOUNDCLOUD_ARTWORK_PATH, "rb"),
                        "genre": "Genre",
                        "tag_list": "event type",
                        "downloadable": "true",
                        "streamable": "true",
                        "feedable": "true",
                    },
                )
track.state

Expected behaviour:

A track state: https://developers.soundcloud.com/docs#uploading
If successful, your track will immediately be queued up for encoding. You check the state property of the track resource to check its progress. Once the state is finished it is ready to be embedded or streamed.

track.state

Actual behaviour:

track.state
AttributeError soundcloud.resource in getattr
AttributeError

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions