0

When I start Quart without Mongo, every think is fine. But after I start to intergrated Qurat-Moto I have the following error:

AttributeError: module 'quart.json' has no attribute 'JSONEncoder'

I try several Python interpretor: Poetry with Python 3.10, Python 3.10 alone, Python 3.8 alone, I always have this error.

Thanks you for your help.

from quart import Quart
from quart_motor import Motor

app = Quart(__name__)                 
mongo = Motor(app, uri="mongodb://localhost:27017")

if __name__ == "__main__":
    app.run(debug=True)
sebajou
  • 3
  • 2

1 Answers1

1

This is an incompatibility with Quart 0.18.0 and quart-motor and described on their github. It looks the maintainer of quart-motor has not gotten around to fixing it. You can downgrade to Quart 0.17.0 and that should fix it. Otherwise leave a comment on the issue saying you'd like to see this fixed.

UberLax
  • 11
  • 3