mirror of
https://github.com/FrostBreker/spotify-private-api.git
synced 2026-04-27 06:26:00 +03:00
[GH-ISSUE #2] code returns error messages everytime #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tim1f1 on GitHub (Mar 22, 2025).
Original GitHub issue: https://github.com/FrostBreker/spotify-private-api/issues/2
Originally assigned to: @FrostBreker on GitHub.
For a week or two now I've been getting error messages whenever I try running codes using this script e.g.
returns
C:\Users\Timothy\GO>go run playcount.go
command-line-arguments
.\playcount.go:22:24: track.Album undefined (type responseTypes.TrackResponse has no field or method Album)
.\playcount.go:26:18: track.Artists undefined (type responseTypes.TrackResponse has no field or method Artists)
.\playcount.go:27:28: track.Artists undefined (type responseTypes.TrackResponse has no field or method Artists)
and
returns
...
C:\Users\Timothy\GO>go run carly.go
2025/03/22 17:29:49 [INFO] --> Successfully created client
2025/03/22 17:29:49 [INFO] --> Fetching track: 6AGklQLROYjvD8qxAPrk3b
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
github.com/FrostBreker/spotify-private-api.FetchSpotifyClientToken()
C:/Users/Timothy/go/pkg/mod/github.com/!frost!breker/spotify-private-api@v1.0.9/helpers.go:143 +0x632
github.com/FrostBreker/spotify-private-api.GetSpotifyClientToken()
C:/Users/Timothy/go/pkg/mod/github.com/!frost!breker/spotify-private-api@v1.0.9/helpers.go:86 +0x4e
github.com/FrostBreker/spotify-private-api.SetHeadersForSpotifyRequest(0xc00009c280)
C:/Users/Timothy/go/pkg/mod/github.com/!frost!breker/spotify-private-api@v1.0.9/helpers.go:168 +0x148
github.com/FrostBreker/spotify-private-api.(*Client).FetchTrack(, {, _})
C:/Users/Timothy/go/pkg/mod/github.com/!frost!breker/spotify-private-api@v1.0.9/functions.go:28 +0xf6
main.main()
C:/Users/Timothy/GO/carly.go:56 +0x466
exit status 2
C:\Users\Timothy\GO>
...