-
Notifications
You must be signed in to change notification settings - Fork 1
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: reflect: call of reflect.Value.Type on zero Value #3
Comments
I'll take a look at it when I get home tonight. Thanks for reporting the issue. |
No problem, thanks for responding so quickly! I'm sure I'm doing something wrong because it's working fine in my other app. I just don't know what it could be. |
That panic happens when the reflect.Value.Type() method is called on an zero value (i.e. uninitialized struct, nil, 0, empty string, etc). cachestore calls this method in checkMultiArg() (appengine.go : 54) on the reflected value of the destination (when decoding) or source (when encoding). This would be a *Service in your case. In which case I know exactly what's wrong, and it's my fault: cachestore doesn't work with pointer destinations or sources. I'll see what I can do to get that working. In the mean time, try Get/Pull with a Service rather than a *Service, that should work. |
Oh, I thought it wanted pointers to empty structs. From the docs on cachestore.Get: |
Oops, that should say "either a pointer OR a zero valued struct" and since I haven't figured out how to get gob to nicely marshal/unmarshal with pointers (even though it should do that automatically according to the docs) it only works with zero valued structs. |
Updated the docs and the readme so people know about the problem. |
I'm getting this error and I'm not sure what's causing it or how to debug it.
panic: reflect: call of reflect.Value.Type on zero Value
I'm getting it when doing a Get or Put with a the entity type
Service
:And, this is the code that's failing with cachestore. They both work fine with datastore.Get/Put, but fail with cachestore.
GETTING:
PUTTING:
The text was updated successfully, but these errors were encountered: