How do I use third party versions of appengine?

huangapple go评论93阅读模式
英文:

How do I use third party versions of appengine?

问题

我正在使用Go网站中的github/golang/appengine包。我以为我需要使用"goapp"来在本地使用Datastore。goapp可以成功构建我的代码,但我一直收到以下错误信息:

ERROR    2014-05-10 17:15:18,875 http_runtime.py:262] bad runtime process port ['']

panic: proto: duplicate enum registered: appengine.ModulesServiceError_ErrorCode 

我尝试给appengine包设置别名,但仍然出现这个错误。有人知道我为什么会收到这个错误吗?请告诉我你需要看到的任何代码。

英文:

I am using the github/golang/appengine package in a Go website. I was under the impression I need to use "goapp" in order to use Datastore locally. Fine and dandy. goapp build my code ok, but I keep getting

ERROR    2014-05-10 17:15:18,875 http_runtime.py:262] bad runtime process port ['']

panic: proto: duplicate enum registered: appengine.ModulesServiceError_ErrorCode 

I tried aliasing the appengine packages, and I still get this error. Does anyone know why I am getting this error? Let me know whatever code you need to see.

答案1

得分: 3

你之所以出现恐慌是因为你混合使用了传统的App Engine和托管的VM。你不能这样做。google.golang.org/appengine包只适用于托管的VM;如果你不使用托管的VM,那么你需要继续导入appengineappengine/datastore或类似的包。

英文:

You are getting that panic because you are mixing traditional App Engine and Managed VMs. You can't do that. The google.golang.org/appengine packages are only for Managed VMs; if you aren't using Managed VMs then you need to stick with importing appengine or appengine/datastore or similar.

huangapple
  • 本文由 发表于 2014年5月11日 06:27:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/23586972.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定