プロジェクト

全般

プロフィール

UnitTest #411

ImportError: No module named appengine.ext を修正する

みぞ @mizo0203 さんが5年以上前に追加. 5年以上前に更新.

ステータス:
完了
優先度:
通常
対象バージョン:
開始日:
2018/08/04
期日:
進捗率:

100%

予定工数:
作業時間:

説明

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.

他の形式にエクスポート: Atom PDF