1

I'm following this page to write a micrservice to GET data from a SQLAlchemy model: https://fastapi.tiangolo.com/tutorial/sql-databases/

And my file structure looks like this:

enter image description here

I can't get past this error:

  File "./main.py", line 8, in <module>
    from . import crud, models, schemas
ImportError: attempted relative import with no known parent package

Can anyone clue me in?

The file in question is located here: https://github.com/goterpsgo/ecommerce/blob/decorative_base/srv_users/main.py#L8

TIA,

  • Joe
snakecharmerb
  • 36,887
  • 10
  • 71
  • 115
goterpsgo
  • 177
  • 1
  • 15

0 Answers0