Hi Matt, Yes, earlier I was trying to make dev_appserver work (along with this flag) from within PyCharm. That did not work if the base python is set up to be Python 3 in PyCharm project.
It worked through command line. It also started to work when I changed the base python to python 2 in pycharm project setup. Now the only thing that does not work is PyCharm debugger along with dev_appserver with this runtime_python_path flag. I am assuming it is due to some conflict between python 2 and python 3 libs somehow getting mixed up. Even if I run dev_appserver thru console/command line and then try to attach PyCharm debugger with this task, it doesn’t work. It will help if there is a way to make it work and also is well documented. Regards Sajal > On 01-Dec-2021, at 11:11 PM, 'Matt Larkin' via Google App Engine > <google-appengine@googlegroups.com> wrote: > > >dev_appserver doesn't seem to work anyway - gives an assertion error > >(expects python 2, I believe) while my project is Python 3 - in fact trying > >to migrate from 2 to 3. > Sorry, missed this. Without any more details, my guess is you need to > provide the `--runtime_python_path` flag (docs > <https://cloud.google.com/appengine/docs/standard/python3/tools/using-local-server#running_the_local_development_server_dev_appserverpy>). > If you do not, dev_appserver looks for a Py2 interpreter in order to run > (that's the default to remain consistent with legacy behavior). If that > doesn't work, please provide more details (e.g. full error message). > > On Wed, Dec 1, 2021 at 9:34 AM Matt Larkin <mslar...@google.com > <mailto:mslar...@google.com>> wrote: > Thanks. I'm following-up with the engineering team to determine if this is > expected (meaning the docs need to be updated) or a bug. > > On Wed, Dec 1, 2021 at 1:38 AM Sajal Gupta <sa...@visiblebox.com > <mailto:sa...@visiblebox.com>> wrote: > Am able to make this work now using dev_appserver. It doesn't work with flask > server (at least I cold not make it work using flask server as above). > > If that is indeed the case, may be the GAE getting started guide for python 3 > page needs to change to reflect this fact that memcache etc. will work only > thru dev_appserver - at least as of now. > > Regards > On Wednesday, December 1, 2021 at 11:43:09 AM UTC+5:30 Sajal Gupta wrote: > > I am using Flask's server as follows: > > if __name__ == '__main__': > # # This is used when running locally only. When deploying to Google App > # # Engine, a webserver process such as Gunicorn will serve the app. You > # # can configure startup instructions by adding `entrypoint` to app.yaml. > app.run(host='127.0.0.1', port=8080, debug=True) > > And in Pycharm, have set up environment parameter as follows: > FLASK_ENV=development > > Also tried by not having this variable but end result is still the same. > > dev_appserver doesn't seem to work anyway - gives an assertion error (expects > python 2, I believe) while my project is Python 3 - in fact trying to migrate > from 2 to 3. > > Happy to share any additional information which can help debug this. > > Regards > On Tuesday, November 30, 2021 at 9:51:42 PM UTC+5:30 matthe...@google.com <> > wrote: > Hi Sajal, > Are you using dev_appserver to run locally, or are you using some other type > of toolset (e.g., the Flask dev server)? > > Best, > Matt > > On Tue, Nov 30, 2021 at 6:05 AM Sajal Gupta <sa...@visiblebox.com <>> wrote: > Hi, > > I was trying to run the now bundled memcache service on localhost > (python3/flask) but got an error: Attempted RPC call without active security > ticket. > > Could you shed some light on this and if localhost is not supported as of now > and if so, by when will this support be available. > > Thanks > > Sajal > > > On Thursday, November 4, 2021 at 8:17:52 PM UTC+5:30 Wesley C (Google) wrote: > App Engine and Google Cloud serverless users: > > The App Engine <http://cloud.google.com/appengine> team at Google Cloud > <http://cloud.google.com/> had a flurry of announcements and product updates > over the past few months. In case you missed them, we've summarized them here > with relevant links. > > New features to better secure your Google App Engine apps > <https://cloud.google.com/blog/products/serverless/app-engine-egress-controls-and-user-managed-service-accounts> > (Aug 2021) — Introducing a pair of networking and security features: > Egress Controls for Serverless VPC Access > <https://cloud.google.com/appengine/docs/standard/python3/connecting-vpc#manage> > — consistent app (static) outbound IP address > User-managed service accounts > <https://cloud.google.com/appengine/docs/standard/python3/user-managed-service-accounts> > — custom service accounts to restrict apps to only the permissions > necessary, following the best practice of "least privileges" > Exploring serverless with a nebulous app > <https://developers.googleblog.com/2021/09/exploring-serverless-with-nebulous-app.html?utm_source=blog&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_nebserv_sms_201028> > (Sep 2021) — Deploy/shift the same app to App Engine, Cloud Functions, or > Cloud Run without any code changes, and show how to access Cloud APIs from > serverless > Extending support for App Engine bundled services > <https://cloud.google.com/blog/products/serverless/support-for-app-engine-services-in-second-generation-runtimes> > (Sep 2021) — Legacy App Engine APIs/bundled services, e.g., Memcache > <https://cloud.google.com/appengine/docs/standard/java/memcache>, Datastore > <https://cloud.google.com/appengine/docs/standard/java/datastore>, etc., were > left out of the next-generation service (to fight against "vendor lock-in" > not because they were deprecated). Many matured into standalone products, > e.g., Cloud Memorystore <http://cloud.google.com/memorystore>, Cloud > Datastore <http://cloud.google.com/datastore>, etc., respectively anyway. To > help with updating language versions (e.g., Python 2 to 3, Java 8 to 11, > etc.), we've added many of these bundled services "back" to the latest App > Engine runtimes. > Modernizing your serverless applications > <https://cloud.google.com/blog/topics/developers-practitioners/modernizing-your-serverless-applications?utm_source=blog&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_modernizesvls_sms_201003> > (Sep 2021) — Introducing codelabs (hands-on tutorials) and new video series > <http://bit.ly/3xk2Swi> to help customers migrate to standalone services to > modernize & make their apps more portable (second-generation App Engine, > Cloud Functions, Cloud Run; Kubernetes Engine (GKE), Compute Engine VMs; > other cloud, multi-cloud, hybrid cloud, on-prem, etc.): > App Engine webapp2 to Flask > <https://developers.googleblog.com/2021/07/migrating-from-app-engine-webapp2-to-flask.html?utm_source=blog&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_mgrwa2flsk_201008> > App Engine taskqueue to Cloud Tasks > <https://developers.googleblog.com/2021/10/migrating-app-engine-push-queues-to.html?utm_source=blog&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_mgrcloudtasks_sms_201112> > (push queues) > App Engine ndb (Datastore) to Cloud NDB > <http://developers.googleblog.com/2021/07/migrating-from-app-engine-ndb-to-cloud-ndb.html?utm_source=blog&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_mgrcloudndb_201021> > > Cloud NDB to Cloud Datastore > <http://developers.googleblog.com/2021/08/cloud-ndb-to-cloud-datastore-migration.html?utm_source=blog&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_mgrcloudds_201003> > App Engine to Cloud Run (with Docker > <https://developers.googleblog.com/2021/08/containerizing-google-app-engine-apps-for-cloud-run.html?utm_source=blog&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_mgrcrdckr_sms_201017> > or without Docker using Cloud Buildpacks > <https://developers.googleblog.com/2021/09/an-easier-way-to-move-your-app-engine-to-cloud-run.html?utm_source=blog&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_mgrcrbdpk_sms_201031>) > More are on the way… > > While we are working hard to improve your App Engine experience, recognize > App Engine is no longer the only serverless option available from Google > Cloud: > > If you don't have an entire app, have single-function utilities or > microservices, Cloud Functions <http://cloud.google.com/functions> is a great > alternative; it also supports event-driven workloads > For those leveraging containerization as part of their app modernization or > software development workflows or wish to avoid some of the constraints from > App Engine or Cloud Functions, consider Cloud Run <http://cloud.run/>. > > Both Cloud Functions and Cloud Run have similar execution profiles, are > pay-per-use, deploy quickly, and autoscale as needed, just like what you're > used to from App Engine. Providing a more complete serverless product suite > that meets all your use cases and workloads is one of the goals of the Google > Cloud serverless <http://cloud.google.com/serverless> team. > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > "A computer never does what you want... only what you tell it." > wesley chun :: @wescpy <http://twitter.com/wescpy> :: Software Architect > & Engineer > Developer Advocate at Google > <https://cloud.google.com/developers/advocates/wesley-chun/> by day; at > night: Core Python <http://amzn.com/dp/0132269937> > > > -- > You received this message because you are subscribed to a topic in the Google > Groups "Google App Engine" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-appengine/pEi3hxX5YpE/unsubscribe > <https://groups.google.com/d/topic/google-appengine/pEi3hxX5YpE/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > google-appengi...@googlegroups.com <>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-appengine/8519af42-dafe-4b44-968b-60c71917422cn%40googlegroups.com > > <https://groups.google.com/d/msgid/google-appengine/8519af42-dafe-4b44-968b-60c71917422cn%40googlegroups.com?utm_medium=email&utm_source=footer>. > > -- > You received this message because you are subscribed to a topic in the Google > Groups "Google App Engine" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-appengine/pEi3hxX5YpE/unsubscribe > <https://groups.google.com/d/topic/google-appengine/pEi3hxX5YpE/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > google-appengine+unsubscr...@googlegroups.com > <mailto:google-appengine+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-appengine/8abd1488-60b8-443d-81ff-dcd037428b05n%40googlegroups.com > > <https://groups.google.com/d/msgid/google-appengine/8abd1488-60b8-443d-81ff-dcd037428b05n%40googlegroups.com?utm_medium=email&utm_source=footer>. > > -- > You received this message because you are subscribed to a topic in the Google > Groups "Google App Engine" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-appengine/pEi3hxX5YpE/unsubscribe > <https://groups.google.com/d/topic/google-appengine/pEi3hxX5YpE/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > google-appengine+unsubscr...@googlegroups.com > <mailto:google-appengine+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-appengine/CA%2BGxZQvStma_3DqvFx5un5yz6%3DaFkUbHmjS%3Dsu5trQgOYXtTQw%40mail.gmail.com > > <https://groups.google.com/d/msgid/google-appengine/CA%2BGxZQvStma_3DqvFx5un5yz6%3DaFkUbHmjS%3Dsu5trQgOYXtTQw%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/21FB20DC-DB6F-4EB8-A0DE-ACD12AA414B0%40visiblebox.com.