Project

General

Profile

UnitTest #411

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

Added by みぞ @mizo0203 almost 7 years ago. Updated almost 7 years ago.

Status:
完了
Priority:
通常
Target version:
Start date:
08/04/2018
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

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.

#1

Updated by 古明地こいし @redmizo_info almost 7 years ago

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

#2

Updated by みぞ @mizo0203 almost 7 years ago

  • Status changed from 新規 to 解決
  • % Done changed from 0 to 80

更新履歴 github|2234a20e806675dc98dba148c06e92f6b2777bdc で適用されました。

#3

Updated by みぞ @mizo0203 almost 7 years ago

  • Target version set to v0.1-demo
#4

Updated by a a almost 7 years ago

  • Status changed from 解決 to 完了
  • % Done changed from 80 to 100

Also available in: Atom PDF