1

Getting the following error:

"/srv/server.py", line 12, in from .routes.solver import route as solve ImportError: attempted relative import with no known parent package

Deploying the app to AppEngine Standard env, and my project looks like so:

---/
 |_app.yaml
 |_server.py
 |_routes
   |_solver.py

In server I do from .routes.solver import route as solve and get the above error in GCP, but not locally.

I tried https://stackoverflow.com/a/16985066/483616 and a few others. Tried with __init__.py at pretty much every level and every location. Then saw that it wasn't needed for python3, so removed. Pretty much unsure what to do now.

knownasilya
  • 5,998
  • 4
  • 36
  • 59

1 Answers1

1

Not optimistic that this is the answer but just to throw it into the pot, have you seen Problem with Python relative paths when deploying to Google App Engine Flexible ?

glaucon
  • 8,112
  • 9
  • 41
  • 63