nmrshll / google-photos-api-client-go

Google photos api client in go
35 stars 12 forks source link

interface conversion error #5

Closed poleguy closed 4 years ago

poleguy commented 5 years ago

I just got this error while uploading. I restarted and it kept on going, so it seems like a transient error. It may not be in your client, but it looks like transient url errors aren't being handled:

2019/05/29 07:42:06 0504191058.jpg uploaded successfully as AO7IUSvd2iUBapey3DdFe6alOyCTvl61kNiACBVTdCWFRUtDtxPPKqLjfSZmGJnYgZd0tDtElTypVkD-zIO13cfJgE5EBWME3g 2019/05/29 07:42:06 Marked as uploaded: /data/sync/nick_V20/Camera/Camera/0504191058.jpg 2019/05/29 07:42:06 Uploading 0504191058a.jpg panic: interface conversion: error is url.Error, not googleapi.Error

goroutine 16 [running]: github.com/nmrshll/google-photos-api-client-go/lib-gphotos.(Client).UploadFile(0xc0002709e8, 0xc0002d4180, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /home/poleguy/go/src/github.com/nmrshll/google-photos-api-client-go/lib-gphotos/client.go:123 +0xb4f github.com/nmrshll/gphotos-uploader-cli/upload.(FileUpload).upload(0xc0002709b0, 0xc000243fa8, 0x1) /home/poleguy/go/src/github.com/nmrshll/gphotos-uploader-cli/upload/fileUpload.go:52 +0x7f github.com/nmrshll/gphotos-uploader-cli/upload.StartFileUploadWorker.func1(0xc0001c0040) /home/poleguy/go/src/github.com/nmrshll/gphotos-uploader-cli/upload/fileUpload.go:32 +0x75 created by github.com/nmrshll/gphotos-uploader-cli/upload.StartFileUploadWorker /home/poleguy/go/src/github.com/nmrshll/gphotos-uploader-cli/upload/fileUpload.go:30 +0x87

poleguy commented 4 years ago

This error no longer seems to happen in the latsest gphotos-uploader-cli v1.0.6 after blowing away my existing security keys and setting up new ones with a new app and oauth2 settings with google. Likely this bug report can be closed as irrelevant unless someone else is seeing it in an a current app.