raised BadValueError(Entity has uninitialized properties: created_by)
up vote
0
down vote
favorite
i am getting 500 error. i checked the logs on google app engine. And i find out it was due to raised BadValueError(Entity has uninitialized properties: created_by)
there is a screen shot of the logs. do have a check below.
the model in which we use to create the datastore is this .
class YoProject(BaseNDBExpando):
project_name = ndb.StringProperty(required=True)
***created_by = ndb.KeyProperty(required=True)***
created_by_name = ndb.StringProperty(required=True, indexed=False)
client_name = ndb.StringProperty(required=True)
client_spoc_name = ndb.StringProperty(required=True, indexed=False)
client_spoc_email = ndb.StringProperty(required=True)
type_ = ndb.StringProperty(required=True, choices=["tm", "pa"])
description = ndb.TextProperty(indexed=False)
hidden = ndb.BooleanProperty(required=True, default=False)
it was running fine. but when i try to introduce a class property in it.i start getting this error and also on GAE Datastore dashboard there are two same property of different datatypes i don,t how to handle this situation. need guidance and help from senior developers.
python-2.7 google-app-engine web-applications google-cloud-datastore webapp2
add a comment |
up vote
0
down vote
favorite
i am getting 500 error. i checked the logs on google app engine. And i find out it was due to raised BadValueError(Entity has uninitialized properties: created_by)
there is a screen shot of the logs. do have a check below.
the model in which we use to create the datastore is this .
class YoProject(BaseNDBExpando):
project_name = ndb.StringProperty(required=True)
***created_by = ndb.KeyProperty(required=True)***
created_by_name = ndb.StringProperty(required=True, indexed=False)
client_name = ndb.StringProperty(required=True)
client_spoc_name = ndb.StringProperty(required=True, indexed=False)
client_spoc_email = ndb.StringProperty(required=True)
type_ = ndb.StringProperty(required=True, choices=["tm", "pa"])
description = ndb.TextProperty(indexed=False)
hidden = ndb.BooleanProperty(required=True, default=False)
it was running fine. but when i try to introduce a class property in it.i start getting this error and also on GAE Datastore dashboard there are two same property of different datatypes i don,t how to handle this situation. need guidance and help from senior developers.
python-2.7 google-app-engine web-applications google-cloud-datastore webapp2
@DanCornilescu i need you help on this.
– Ashish Yadav
Oct 15 at 18:44
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
i am getting 500 error. i checked the logs on google app engine. And i find out it was due to raised BadValueError(Entity has uninitialized properties: created_by)
there is a screen shot of the logs. do have a check below.
the model in which we use to create the datastore is this .
class YoProject(BaseNDBExpando):
project_name = ndb.StringProperty(required=True)
***created_by = ndb.KeyProperty(required=True)***
created_by_name = ndb.StringProperty(required=True, indexed=False)
client_name = ndb.StringProperty(required=True)
client_spoc_name = ndb.StringProperty(required=True, indexed=False)
client_spoc_email = ndb.StringProperty(required=True)
type_ = ndb.StringProperty(required=True, choices=["tm", "pa"])
description = ndb.TextProperty(indexed=False)
hidden = ndb.BooleanProperty(required=True, default=False)
it was running fine. but when i try to introduce a class property in it.i start getting this error and also on GAE Datastore dashboard there are two same property of different datatypes i don,t how to handle this situation. need guidance and help from senior developers.
python-2.7 google-app-engine web-applications google-cloud-datastore webapp2
i am getting 500 error. i checked the logs on google app engine. And i find out it was due to raised BadValueError(Entity has uninitialized properties: created_by)
there is a screen shot of the logs. do have a check below.
the model in which we use to create the datastore is this .
class YoProject(BaseNDBExpando):
project_name = ndb.StringProperty(required=True)
***created_by = ndb.KeyProperty(required=True)***
created_by_name = ndb.StringProperty(required=True, indexed=False)
client_name = ndb.StringProperty(required=True)
client_spoc_name = ndb.StringProperty(required=True, indexed=False)
client_spoc_email = ndb.StringProperty(required=True)
type_ = ndb.StringProperty(required=True, choices=["tm", "pa"])
description = ndb.TextProperty(indexed=False)
hidden = ndb.BooleanProperty(required=True, default=False)
it was running fine. but when i try to introduce a class property in it.i start getting this error and also on GAE Datastore dashboard there are two same property of different datatypes i don,t how to handle this situation. need guidance and help from senior developers.
python-2.7 google-app-engine web-applications google-cloud-datastore webapp2
python-2.7 google-app-engine web-applications google-cloud-datastore webapp2
asked Oct 15 at 17:21
Ashish Yadav
345
345
@DanCornilescu i need you help on this.
– Ashish Yadav
Oct 15 at 18:44
add a comment |
@DanCornilescu i need you help on this.
– Ashish Yadav
Oct 15 at 18:44
@DanCornilescu i need you help on this.
– Ashish Yadav
Oct 15 at 18:44
@DanCornilescu i need you help on this.
– Ashish Yadav
Oct 15 at 18:44
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
If you are in local environment, I would suggest you to delete/flush all entities of this model.
Then try to reproduce it using another word than classes
as property name.
classes is not issue but the Bad Value Error(Entity has uninitialized properties: created_by) the app is still runs but i have to refresh the page to move forward in app.
– Ashish Yadav
Oct 16 at 0:56
add a comment |
up vote
0
down vote
I think I saw this error as well in my early GAE days, when I was modifying the entity models all the time, I'm much more reluctant to do it nowadays as I know that such changes need extra care and almost always a migration strategy.
I got it after I added the required=True
option to a model's property. The option causes an error if you're trying to put
am entity without that property set, obviously. But it also causes an error when trying to get an entity put
in the datastore without the property being set, before the option was enabled in the model. This is what I suspect may be happening. Note that this check is ndb
-specific, so it will affect your app code, but not the console viewer or apps using other client libraries.
Look at all entities of that kind in the Entity menu, checking which don't have the property set.
Try enabling debugging for your app (by passing debug=True
in your app's webapp2.WSGIApplication()
call), which should show a traceback attached to the respective request log. It would be helpful to figure out where exactly is the error encountered.
The duplicates you highlighted in the Dashboard image may be red herrings - I see similar ones on my apps as well, with no ill effects (or at least none that I noticed).
I'm not sure if some of them aren't side effects of the various changes I did in time to the entity models, in particular flipping the indexed
setting for some properties.
But I'm almost certain the String/Text ones are simply caused by the datastore Text string properties being indexed only if the value has less than 1500 bytes (i.e what's considered as different property types in ndb
- TextProperty
and StringProperty
).
Also note the 0B
indexes are normal for properties being not indexed, see for example your description
property.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
If you are in local environment, I would suggest you to delete/flush all entities of this model.
Then try to reproduce it using another word than classes
as property name.
classes is not issue but the Bad Value Error(Entity has uninitialized properties: created_by) the app is still runs but i have to refresh the page to move forward in app.
– Ashish Yadav
Oct 16 at 0:56
add a comment |
up vote
0
down vote
If you are in local environment, I would suggest you to delete/flush all entities of this model.
Then try to reproduce it using another word than classes
as property name.
classes is not issue but the Bad Value Error(Entity has uninitialized properties: created_by) the app is still runs but i have to refresh the page to move forward in app.
– Ashish Yadav
Oct 16 at 0:56
add a comment |
up vote
0
down vote
up vote
0
down vote
If you are in local environment, I would suggest you to delete/flush all entities of this model.
Then try to reproduce it using another word than classes
as property name.
If you are in local environment, I would suggest you to delete/flush all entities of this model.
Then try to reproduce it using another word than classes
as property name.
answered Oct 15 at 19:37
ThisIsMyName
1325
1325
classes is not issue but the Bad Value Error(Entity has uninitialized properties: created_by) the app is still runs but i have to refresh the page to move forward in app.
– Ashish Yadav
Oct 16 at 0:56
add a comment |
classes is not issue but the Bad Value Error(Entity has uninitialized properties: created_by) the app is still runs but i have to refresh the page to move forward in app.
– Ashish Yadav
Oct 16 at 0:56
classes is not issue but the Bad Value Error(Entity has uninitialized properties: created_by) the app is still runs but i have to refresh the page to move forward in app.
– Ashish Yadav
Oct 16 at 0:56
classes is not issue but the Bad Value Error(Entity has uninitialized properties: created_by) the app is still runs but i have to refresh the page to move forward in app.
– Ashish Yadav
Oct 16 at 0:56
add a comment |
up vote
0
down vote
I think I saw this error as well in my early GAE days, when I was modifying the entity models all the time, I'm much more reluctant to do it nowadays as I know that such changes need extra care and almost always a migration strategy.
I got it after I added the required=True
option to a model's property. The option causes an error if you're trying to put
am entity without that property set, obviously. But it also causes an error when trying to get an entity put
in the datastore without the property being set, before the option was enabled in the model. This is what I suspect may be happening. Note that this check is ndb
-specific, so it will affect your app code, but not the console viewer or apps using other client libraries.
Look at all entities of that kind in the Entity menu, checking which don't have the property set.
Try enabling debugging for your app (by passing debug=True
in your app's webapp2.WSGIApplication()
call), which should show a traceback attached to the respective request log. It would be helpful to figure out where exactly is the error encountered.
The duplicates you highlighted in the Dashboard image may be red herrings - I see similar ones on my apps as well, with no ill effects (or at least none that I noticed).
I'm not sure if some of them aren't side effects of the various changes I did in time to the entity models, in particular flipping the indexed
setting for some properties.
But I'm almost certain the String/Text ones are simply caused by the datastore Text string properties being indexed only if the value has less than 1500 bytes (i.e what's considered as different property types in ndb
- TextProperty
and StringProperty
).
Also note the 0B
indexes are normal for properties being not indexed, see for example your description
property.
add a comment |
up vote
0
down vote
I think I saw this error as well in my early GAE days, when I was modifying the entity models all the time, I'm much more reluctant to do it nowadays as I know that such changes need extra care and almost always a migration strategy.
I got it after I added the required=True
option to a model's property. The option causes an error if you're trying to put
am entity without that property set, obviously. But it also causes an error when trying to get an entity put
in the datastore without the property being set, before the option was enabled in the model. This is what I suspect may be happening. Note that this check is ndb
-specific, so it will affect your app code, but not the console viewer or apps using other client libraries.
Look at all entities of that kind in the Entity menu, checking which don't have the property set.
Try enabling debugging for your app (by passing debug=True
in your app's webapp2.WSGIApplication()
call), which should show a traceback attached to the respective request log. It would be helpful to figure out where exactly is the error encountered.
The duplicates you highlighted in the Dashboard image may be red herrings - I see similar ones on my apps as well, with no ill effects (or at least none that I noticed).
I'm not sure if some of them aren't side effects of the various changes I did in time to the entity models, in particular flipping the indexed
setting for some properties.
But I'm almost certain the String/Text ones are simply caused by the datastore Text string properties being indexed only if the value has less than 1500 bytes (i.e what's considered as different property types in ndb
- TextProperty
and StringProperty
).
Also note the 0B
indexes are normal for properties being not indexed, see for example your description
property.
add a comment |
up vote
0
down vote
up vote
0
down vote
I think I saw this error as well in my early GAE days, when I was modifying the entity models all the time, I'm much more reluctant to do it nowadays as I know that such changes need extra care and almost always a migration strategy.
I got it after I added the required=True
option to a model's property. The option causes an error if you're trying to put
am entity without that property set, obviously. But it also causes an error when trying to get an entity put
in the datastore without the property being set, before the option was enabled in the model. This is what I suspect may be happening. Note that this check is ndb
-specific, so it will affect your app code, but not the console viewer or apps using other client libraries.
Look at all entities of that kind in the Entity menu, checking which don't have the property set.
Try enabling debugging for your app (by passing debug=True
in your app's webapp2.WSGIApplication()
call), which should show a traceback attached to the respective request log. It would be helpful to figure out where exactly is the error encountered.
The duplicates you highlighted in the Dashboard image may be red herrings - I see similar ones on my apps as well, with no ill effects (or at least none that I noticed).
I'm not sure if some of them aren't side effects of the various changes I did in time to the entity models, in particular flipping the indexed
setting for some properties.
But I'm almost certain the String/Text ones are simply caused by the datastore Text string properties being indexed only if the value has less than 1500 bytes (i.e what's considered as different property types in ndb
- TextProperty
and StringProperty
).
Also note the 0B
indexes are normal for properties being not indexed, see for example your description
property.
I think I saw this error as well in my early GAE days, when I was modifying the entity models all the time, I'm much more reluctant to do it nowadays as I know that such changes need extra care and almost always a migration strategy.
I got it after I added the required=True
option to a model's property. The option causes an error if you're trying to put
am entity without that property set, obviously. But it also causes an error when trying to get an entity put
in the datastore without the property being set, before the option was enabled in the model. This is what I suspect may be happening. Note that this check is ndb
-specific, so it will affect your app code, but not the console viewer or apps using other client libraries.
Look at all entities of that kind in the Entity menu, checking which don't have the property set.
Try enabling debugging for your app (by passing debug=True
in your app's webapp2.WSGIApplication()
call), which should show a traceback attached to the respective request log. It would be helpful to figure out where exactly is the error encountered.
The duplicates you highlighted in the Dashboard image may be red herrings - I see similar ones on my apps as well, with no ill effects (or at least none that I noticed).
I'm not sure if some of them aren't side effects of the various changes I did in time to the entity models, in particular flipping the indexed
setting for some properties.
But I'm almost certain the String/Text ones are simply caused by the datastore Text string properties being indexed only if the value has less than 1500 bytes (i.e what's considered as different property types in ndb
- TextProperty
and StringProperty
).
Also note the 0B
indexes are normal for properties being not indexed, see for example your description
property.
answered Nov 11 at 6:49
Dan Cornilescu
27k113161
27k113161
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52821801%2fraised-badvalueerrorentity-has-uninitialized-properties-created-by%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
@DanCornilescu i need you help on this.
– Ashish Yadav
Oct 15 at 18:44