Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
329 views
in Technique[技术] by (71.8m points)

python - Google App Engine: from six.moves import http_client no module named moves

Okie dokie,

I'm trying to get Google's Dialogflow python API working with Google App Engine, and I seem to be running into issues when I run the application. I have pip installed dialogflow to a lib folder and added the lib folder through the app.yaml file. I keep running into an error where it says that it can't find 'six.moves.' Very new to this (app engine in general), so please tell me if I have something setup wrong.

I've read a few other threads with no luck. This won't work locally or deployed.

below are my app.yaml file:

runtime: python27
api_version: 1
threadsafe: true
service: basic-npl-ui

handlers:
- url: /img
  static_dir: img

- url: /javascript
  static_dir: javascript

- url: /css
  static_dir: css

- url: /.*
  script: main.app



env_variables:
  GAE_USE_SOCKETS_HTTPLIB: 'anyvalue'

libraries:
- name: jinja2
  version: latest
- name: webapp2
  version: latest
- name: ssl
  version: latest
- name: grpcio
  version: latest

and here's my error log (local development):

Traceback (most recent call last):
  File "/Users/AVD1WIP/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/Users/AVD1WIP/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/Users/AVD1WIP/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])
  File "/Users/AVD1WIP/Documents/Orca_interns/NLP/basic_ui_app/main.py", line 28, in <module>
    from src.dialog_response_util import DialogflowResponseUtil
  File "/Users/AVD1WIP/Documents/Orca_interns/NLP/basic_ui_app/src/dialog_response_util.py", line 2, in <module>
    import dialogflow
  File "/Users/AVD1WIP/Documents/Orca_interns/NLP/basic_ui_app/lib/dialogflow/__init__.py", line 17, in <module>
    from dialogflow_v2 import AgentsClient
  File "/Users/AVD1WIP/Documents/Orca_interns/NLP/basic_ui_app/lib/dialogflow_v2/__init__.py", line 18, in <module>
    from dialogflow_v2.gapic import agents_client
  File "/Users/AVD1WIP/Documents/Orca_interns/NLP/basic_ui_app/lib/dialogflow_v2/gapic/agents_client.py", line 19, in <module>
    import google.api_core.gapic_v1.client_info
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/api_core/gapic_v1/__init__.py", line 16, in <module>
    from google.api_core.gapic_v1 import config
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/api_core/gapic_v1/config.py", line 26, in <module>
    from google.api_core import exceptions
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/api_core/exceptions.py", line 26, in <module>
    from six.moves import http_client
ImportError: No module named moves
INFO     2018-06-08 20:20:19,020 module.py:846] basic-npl-ui: "GET / HTTP/1.1" 500 -
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...