duandao1931 2018-04-12 17:17
浏览 69
已采纳

InvalidAppConfigError:重复的模块:my-service

My computer (Windows 10) hosting my VM (Ubuntu 16.04) restarted last night (because Windows is a jerk) and now I can't seem to run my service locally. This was running fine yesterday and I haven't changed a single line of code. Only thing that happened was the reboot.

I am running dev_appserver.py ./ app.yaml.

My app.yaml file:

runtime: go
api_version: go1
service: my-service

handlers:
- url: /.*
  script: _go_app

#[START env_variables]
env_variables:
 GCLOUD_STORAGE_BUCKET: my-cloud-bucket
#[END env_variables]

and the error I get is:

Traceback (most recent call last):
  File "/usr/lib/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 103, in <module>
    _run_file(__file__, globals())
  File "/usr/lib/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 97, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 350, in <module>
    main()
  File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 338, in main
    dev_server.start(options)
  File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 94, in start
    env_variables=parsed_env_variables)
  File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 953, in __init__
    module.module_name)
google.appengine.tools.devappserver2.errors.InvalidAppConfigError: Duplicate >module: my-service

Any advice?

  • 写回答

1条回答

  • duanpin9531 2018-04-12 17:26
    关注

    You shouldn't need to specify both the application directory (./ in your case) and the app.yaml simultaneously. From Running the local development server:

    Specify the directory path to your app, for example:

    dev_appserver.py [PATH_TO_YOUR_APP]
    

    Alternatively, you can specify the configuration file of a specific service, for example:

    dev_appserver.py app.yaml
    

    Most likely the server detects the app.yaml from the directory specification and then gets it again from the app.yaml specification, leading to the duplicate service error.

    I'd simply drop the ./ directory specification from the command line (I'd rather not rely on the auto-detection, which can fail miserably for multi-service apps).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 MATLAB怎么通过柱坐标变换画开口是圆形的旋转抛物面?
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿