mongodb / flask-pymongo

PyMongo support for Flask applications
BSD 2-Clause "Simplified" License
721 stars 175 forks source link

cannot start the motor due to AttributeError: type object 'Cursor' has no attribute 'allow_disk_use' #146

Closed yuxx1006 closed 4 years ago

yuxx1006 commented 4 years ago

Traceback (most recent call last): File "main.py", line 5, in import motor.motor_asyncio File "/Users/xiao2/opt/anaconda3/envs/tf/lib/python3.7/site-packages/motor/init.py", line 35, in from .motor_tornado import * File "/Users/xiao2/opt/anaconda3/envs/tf/lib/python3.7/site-packages/motor/motor_tornado.py", line 41, in MotorCursor = create_motor_class(core.AgnosticCursor) File "/Users/xiao2/opt/anaconda3/envs/tf/lib/python3.7/site-packages/motor/motor_tornado.py", line 26, in create_motor_class 'motor.motor_tornado') File "/Users/xiao2/opt/anaconda3/envs/tf/lib/python3.7/site-packages/motor/metaprogramming.py", line 288, in create_class_with_framework new_class_attr = attr.create_attribute(new_class, name) File "/Users/xiao2/opt/anaconda3/envs/tf/lib/python3.7/site-packages/motor/metaprogramming.py", line 251, in create_attribute cursor_method = getattr(cls.__delegate_class__, attr_name) AttributeError: type object 'Cursor' has no attribute 'allow_disk_use'

dcrosta commented 4 years ago

https://github.com/mongodb/motor is a different project, please log this issue there. I also suggest you include versions of mongodb, pymongo, and steps to reproduce or some information about what you’re trying to do with it, it’s hard to diagnose a problem with only a stack trace.