Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: interface conversion: interface {} is nil, not map[string]interface {} #16

Open
NoLooseEnds opened this issue Apr 6, 2018 · 5 comments

Comments

@NoLooseEnds
Copy link

Not sure what caused this and if this is any help, but here is the last bits of the output.

This is running on a Macbook Pro Retina with macOS 10.13.3.
Images are located on an external drive.

2018/04/06 02:57:55 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0715.JPG' completed
2018/04/06 02:57:58 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0716.JPG' completed
2018/04/06 02:59:51 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0718.JPG' completed
2018/04/06 03:00:00 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0717.JPG' completed
2018/04/06 03:01:34 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0719.JPG' completed
2018/04/06 03:01:40 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0720.JPG' completed
2018/04/06 03:03:21 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0722.JPG' completed
2018/04/06 03:03:46 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0721.JPG' completed
2018/04/06 03:04:45 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0724.JPG' completed
2018/04/06 03:05:57 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0723.JPG' completed
2018/04/06 03:06:23 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0725.JPG' completed
2018/04/06 03:06:28 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0726.JPG' completed
2018/04/06 03:07:11 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0727.JPG' completed
2018/04/06 03:08:40 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0728.JPG' completed
2018/04/06 03:09:14 Upload of '/Volumes/path/to/dir/Photos Library.photoslibrary/Masters/2016/08/03/20160803-164101/IMG_0730.JPG' completed
panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 33 [running]:
github.com/simonedegiacomi/gphotosuploader/api.EnableImageResponse.getEnabledImageId(0xc420064640, 0x3, 0x4, 0x128a320, 0xc420144098)
	/Users/<removed>/go/src/github.com/simonedegiacomi/gphotosuploader/api/models.go:108 +0x27f
github.com/simonedegiacomi/gphotosuploader/api.(*Upload).enablePhoto(0xc420b94500, 0xc42069e120, 0x0, 0x0, 0x0)
	/Users/<removed>/go/src/github.com/simonedegiacomi/gphotosuploader/api/uploadSteps.go:238 +0xe3c
github.com/simonedegiacomi/gphotosuploader/api.(*Upload).Upload(0xc420b94500, 0xc420085410, 0xc42004acf0, 0xc42004ae50)
	/Users/<removed>/go/src/github.com/simonedegiacomi/gphotosuploader/api/upload.go:125 +0x151
github.com/simonedegiacomi/gphotosuploader/utils.(*ConcurrentUploader).uploadFile(0xc4201bc150, 0xc420614600, 0x79)
	/Users/<removed>/Downloads/gphotoupload/go/src/github.com/simonedegiacomi/gphotosuploader/utils/uploader.go:144 +0x16c
created by github.com/simonedegiacomi/gphotosuploader/utils.(*ConcurrentUploader).EnqueueUpload
	/Users/<removed>/Downloads/gphotoupload/go/src/github.com/simonedegiacomi/gphotosuploader/utils/uploader.go:107 +0x137
exit status 2
@NoLooseEnds NoLooseEnds changed the title Panic panic: interface conversion: interface {} is nil, not map[string]interface {} Apr 6, 2018
@siongui
Copy link
Contributor

siongui commented Apr 6, 2018

@NoLooseEnds I want to report this issue and it seems you open the issue a little bit earlier than me. I am trying to see if I can fix it. I usually got this panic when I try to upload many files at the same time.

@NoLooseEnds
Copy link
Author

NoLooseEnds commented Apr 6, 2018

Yes, this happened when uploading from the "Masters" folder of an Apple Photos (i.e all images in the library). So yes, many files.

I can't program Go, so can't help you there, but let me know if you want me to test anything.

@sledge1977
Copy link

sledge1977 commented Apr 19, 2018

I'm seeing a similar issue while trying to upload many files. This is the output I get:

panic: interface conversion: interface {} is nil, not []interface {}

goroutine 33 [running]:
github.com/simonedegiacomi/gphotosuploader/api.EnableImageResponse.getEnabledImageId(0xc4200a0440, 0x3, 0x4, 0x6826c0, 0xc42081c010)
        /home/jens/go/src/github.com/simonedegiacomi/gphotosuploader/api/models.go:112 +0x1f0
github.com/simonedegiacomi/gphotosuploader/api.(*Upload).enablePhoto(0xc4202f2100, 0xc4201b43f0, 0x0, 0x0, 0x0)
        /home/jens/go/src/github.com/simonedegiacomi/gphotosuploader/api/uploadSteps.go:238 +0xdba
github.com/simonedegiacomi/gphotosuploader/api.(*Upload).Upload(0xc4202f2100, 0xc420089320, 0xc420086c60, 0xc420086dc0)
        /home/jens/go/src/github.com/simonedegiacomi/gphotosuploader/api/upload.go:126 +0x125
github.com/simonedegiacomi/gphotosuploader/utils.(*ConcurrentUploader).uploadFile(0xc420011d50, 0xc420656de0, 0x56)
        /home/jens/go/src/github.com/simonedegiacomi/gphotosuploader/utils/uploader.go:144 +0x16c
created by github.com/simonedegiacomi/gphotosuploader/utils.(*ConcurrentUploader).EnqueueUpload
        /home/jens/go/src/github.com/simonedegiacomi/gphotosuploader/utils/uploader.go:107 +0x133

@simonedegiacomi
Copy link
Owner

Are you sure you're running the latest version? because that file (model.go) is now smaller and it doesn't have the line 112.
To simplify things i added a --version flag, so you can easily see if you're running the latest version.

@sledge1977
Copy link

sledge1977 commented Apr 19, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants