UnitTest #411
ImportError: No module named appengine.ext を修正する
説明
test_main (unittest.loader.ModuleImportFailure) ... ERROR test_infra (unittest.loader.ModuleImportFailure) ... ERROR ====================================================================== ERROR: test_main (unittest.loader.ModuleImportFailure) ---------------------------------------------------------------------- ImportError: Failed to import test module: test_main Traceback (most recent call last): File "/usr/local/lib/python2.7/unittest/loader.py", line 254, in _find_tests module = self._get_module_from_name(name) File "/usr/local/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name __import__(name) File "/home/circleci/repo/tests/test_main.py", line 25, in <module> import main File "main.py", line 25, in <module> import infra File "infra.py", line 21, in <module> from google.appengine.ext import ndb ImportError: No module named appengine.ext ====================================================================== ERROR: test_infra (unittest.loader.ModuleImportFailure) ---------------------------------------------------------------------- ImportError: Failed to import test module: test_infra Traceback (most recent call last): File "/usr/local/lib/python2.7/unittest/loader.py", line 254, in _find_tests module = self._get_module_from_name(name) File "/usr/local/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name __import__(name) File "/home/circleci/repo/tests/test_infra.py", line 23, in <module> import infra File "infra.py", line 21, in <module> from google.appengine.ext import ndb ImportError: No module named appengine.ext ---------------------------------------------------------------------- Ran 2 tests in 0.000s FAILED (errors=2)
https://stackoverflow.com/questions/15783783/python-import-error-no-module-named-appengine-ext
I ran the following command through Terminal (I'm using Mac) :
export PYTHONPATH="$PYTHONPATH:/usr/local/google_appengine:/usr/local/google_appengine/lib/:/usr/local/google_appengine/lib/yaml/"
. You have to configure the paths to the libraries.
古明地こいし @redmizo_info さんが6年以上前に更新
Commit: 2234a20e806675dc98dba148c06e92f6b2777bdc
https://github.com/mizo0203/google-home-shiritori/commit/2234a20e806675dc98dba148c06e92f6b2777bdc
Author: みぞ@CrazyBeatCoder mizo0203@mizo0203.com
Date: 2018-08-04 (Sat, 04 Aug 2018)
Log Message:
chore(.circleci/config.yml): Add Environment variable ’PYTHONPATH'. fix #411 @6.0h
みぞ @mizo0203 さんが6年以上前に更新
- ステータス を 新規 から 解決 に変更
- 進捗率 を 0 から 80 に変更
更新履歴 github|2234a20e806675dc98dba148c06e92f6b2777bdc で適用されました。