flask-tumblelog icon indicating copy to clipboard operation
flask-tumblelog copied to clipboard

Errors NotRegistered flask-mongoengine Tutorial

Open juvasquezg opened this issue 11 years ago • 3 comments

Hi,

I started this Turial, Here

And get this error

**mongoengine.errors.NotRegistered: ** `Comment` has not been registered in the document registry. Importing the document class automatically registers it, has it been imported?

any idea. Thank you So much.

juvasquezg avatar Apr 08 '15 16:04 juvasquezg

You have to put the Comment class before the Post class.

Check this Stackoverflow answer

dvdme avatar Apr 12 '15 00:04 dvdme

Thank you!!

juvasquezg avatar Apr 12 '15 01:04 juvasquezg

No problem! Also, I had thisTypeError while testing flask-tumblelog and a couple of other example apps like this one:

TypeError: __init__() got an unexpected keyword argument 'snapshot'

It happens always when I retrive data from mongodb.

This only happened with pymongo 3.0. To fix it, downgrade pymongo to 2.8.

pip install pymongo==2.8

dvdme avatar Apr 12 '15 11:04 dvdme