You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I updated the gloud up to 0.36.0 version (preveous 0.33.0) and currently I cannot save the data to the datastore using by gcloud.datastore.save(entities, callback). When I tried to save the entities
> Error: Illegal value for [object Object] of type double: string (not a number)
> at Error (native)
> at null.<anonymous> (C:\Data\Projects\dashboard\node_modules\protobufjs\dist\ProtoBuf.js:1769:23)
> at ProtoBuf.Reflect.ElementPrototype.verifyValue (C:\Data\Projects\dashboard\node_modules\protobufjs\dist\ProtoBuf.js:1825:25)
> at ProtoBuf.Reflect.FieldPrototype.verifyValue (C:\Data\Projects\dashboard\node_modules\protobufjs\dist\ProtoBuf.js:3436:33)
> at MessagePrototype.set (C:\Data\Projects\dashboard\node_modules\protobufjs\dist\ProtoBuf.js:2443:59)
> at MessagePrototype.set (C:\Data\Projects\dashboard\node_modules\protobufjs\dist\ProtoBuf.js:2434:38)
> at Message (C:\Data\Projects\dashboard\node_modules\protobufjs\dist\ProtoBuf.js:2363:34)
> at ProtoBuf.Reflect.ElementPrototype.verifyValue (C:\Data\Projects\dashboard\node_modules\protobufjs\dist\ProtoBuf.js:1877:28)
> at new ProtoBuf.Map.Map (C:\Data\Projects\dashboard\node_modules\protobufjs\dist\ProtoBuf.js:4894:46)
> at ProtoBuf.Reflect.FieldPrototype.verifyValue (C:\Data\Projects\dashboard\node_modules\protobufjs\dist\ProtoBuf.js:3427:28)
Maybe problem in ProtoBuf.js or in another methods which are sending float value as string into ProtoBuf.js. As a hot fix I changed the code in ProtoBuf.js (line 1825):
// Float
case ProtoBuf.TYPES["float"]:
case ProtoBuf.TYPES["double"]:
/* if (typeof value !== 'number')
fail(typeof value, "not a number");
return value;*/
// hot fix
if (typeof value !== 'number') {
if (typeof value === 'string') {
var asFloat=parseFloat(value);
if (isNaN(asFloat)) {
fail(typeof value, "not a number");
} else {
return asFloat;
}
} else {
fail(typeof value, "not a number");
}
}
return value;
The text was updated successfully, but these errors were encountered:
I updated the gloud up to 0.36.0 version (preveous 0.33.0) and currently I cannot save the data to the datastore using by gcloud.datastore.save(entities, callback). When I tried to save the entities
I got the error:
Maybe problem in ProtoBuf.js or in another methods which are sending float value as string into ProtoBuf.js. As a hot fix I changed the code in ProtoBuf.js (line 1825):
The text was updated successfully, but these errors were encountered: