kszucs / aiopeewee

Asyncio interface for Peewee ORM
MIT License
46 stars 6 forks source link

ImportError: cannot import name 'NoopSelectQuery' #12

Closed kobelover closed 6 years ago

kobelover commented 6 years ago

hi, when i run sanic aiopeewee example, I get

Traceback (most recent call last):
  File "/Users/name/PycharmProjects/sanic-demo/sanic_aiopeewee.py", line 4, in <module>
    from aiopeewee import AioModel, AioMySQLDatabase, model_to_dict
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiopeewee/__init__.py", line 1, in <module>
    from .model import AioModel
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiopeewee/model.py", line 3, in <module>
    from .query import (AioSelectQuery, AioUpdateQuery, AioInsertQuery,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiopeewee/query.py", line 2, in <module>
    from peewee import SQL, Query, RawQuery, SelectQuery, NoopSelectQuery
ImportError: cannot import name 'NoopSelectQuery'

What happen? Modules is installed

kszucs commented 6 years ago

What peewee version are You using?

kobelover commented 6 years ago

peewee 3.3.4 aiopeewee 0.4.2

kszucs commented 6 years ago

It's probably caused by the new version of peewee. Aiopeewee is currently compatible with peewee<3.0. Please try to downgrade peewee to 2.9

kobelover commented 6 years ago

ok, thanks kszucs.

kszucs commented 6 years ago

You're welcome. We should pin this in setup.py though.

awilliamson commented 6 years ago

An addition to the readme would also go a long way in saving time for people.