2010-12-01 11 views
0

をインポートできません。私のGAEアプリケーションをテストするのにnose(NoseGAE)を使用しようとしていますが、インポートエラーで失敗します。 なぜそれがインポートに失敗したのかはPythonの組み込みのものなので、なぜか理解できません。 実際には、「hello world」を書き出す1つのハンドラを持つ単純なwsgiアプリケーションをテストしています。nosetestsは名前mkdir '

誰でも何が起こっているのか分かりませんか? MAC OSXのユキヒョウのイム

これはトレースバックです:

Traceback (most recent call last): 
    File "/Library/Python/2.6/site-packages/nose-0.11.4-py2.6.egg/nose/loader.py", line 382, in loadTestsFromName 
    addr.filename, addr.module) 
    File "/Library/Python/2.6/site-packages/nose-0.11.4-py2.6.egg/nose/importer.py", line 39, in importFromPath 
    return self.importFromDir(dir_path, fqname) 
    File "/Library/Python/2.6/site-packages/nose-0.11.4-py2.6.egg/nose/importer.py", line 86, in importFromDir 
    mod = load_module(part_fqname, fh, filename, desc) 
    File "/Users/pepe/DEV/nosetests/tornado/testing.py", line 21, in <module> 
    from tornado.httpclient import AsyncHTTPClient 
    File "build/bdist.macosx-10.6-universal/egg/nosegae.py", line 204, in load_module 
    return super(HookMixin, self).load_module(fullname) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1289, in Decorate 
    return func(self, *args, **kwargs) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1939, in load_module 
    return self.FindAndLoadModule(submodule, fullname, search_path) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1289, in Decorate 
    return func(self, *args, **kwargs) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1841, in FindAndLoadModule 
    description) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1289, in Decorate 
    return func(self, *args, **kwargs) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1792, in LoadModuleRestricted 
    description) 
    File "/Users/pepe/DEV/nosetests/tornado/httpclient.py", line 28, in <module> 
    import pycurl 
    File "build/bdist.macosx-10.6-universal/egg/nosegae.py", line 204, in load_module 
    return super(HookMixin, self).load_module(fullname) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1289, in Decorate 
    return func(self, *args, **kwargs) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1939, in load_module 
    return self.FindAndLoadModule(submodule, fullname, search_path) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1289, in Decorate 
    return func(self, *args, **kwargs) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1841, in FindAndLoadModule 
    description) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1289, in Decorate 
    return func(self, *args, **kwargs) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1785, in LoadModuleRestricted 
    return source_file.load_module(submodule_fullname) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/dist/py_zipimport.py", line 213, in load_module 
    exec code in mod.__dict__ 
    File "/Library/Python/2.6/site-packages/pycurl-7.19.0-py2.6-macosx-10.6-universal.egg/pycurl.py", line 7, in <module> 
    __bootstrap__() 
    File "/Library/Python/2.6/site-packages/pycurl-7.19.0-py2.6-macosx-10.6-universal.egg/pycurl.py", line 3, in __bootstrap__ 
    import sys, pkg_resources, imp 
    File "build/bdist.macosx-10.6-universal/egg/nosegae.py", line 204, in load_module 
    return super(HookMixin, self).load_module(fullname) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1289, in Decorate 
    return func(self, *args, **kwargs) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1939, in load_module 
    return self.FindAndLoadModule(submodule, fullname, search_path) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1289, in Decorate 
    return func(self, *args, **kwargs) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1841, in FindAndLoadModule 
    description) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1289, in Decorate 
    return func(self, *args, **kwargs) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 1785, in LoadModuleRestricted 
    return source_file.load_module(submodule_fullname) 
    File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/dist/py_zipimport.py", line 213, in load_module 
    exec code in mod.__dict__ 
    File "/Library/Python/2.6/site-packages/setuptools-0.6c12dev_r85381-py2.6.egg/pkg_resources.py", line 24, in <module> 
    from os import utime, rename, unlink, mkdir 
ImportError: cannot import name mkdir 
+0

溶液を見出した。私はシステムのpythonのために鼻と鼻を除去し、macports経由でインストールされたpython2.5のためにそれをインストールしました。今それは動作し、アプリをテストします。 – aschmid00

答えて

2

のGoogle App Engineのがmkdirを提供していない、何も書き込み可能なファイルシステムはありません。

http://code.google.com/p/appengine-monkey/issues/detail?id=25は同じ問題を抱えている人です。

+0

私のアプリでmkdirを使用していないので、なぜmkdirをインポートしようとしていますか?それ以外にもsetuptoolsパッケージからアクセスしようとしています。 – aschmid00

+1

@ aschmid00:わかりません、残念ながら、 "何が起こっているのか分かりません"ではなく、 "インポートに失敗したものはPython組み込みのもの"としか答えられません。おそらく誰かがそのリンクに記載されていることの1つを実行したはずですが、誤った設定がありますか? 「appengine-monkey」のような形でサルパッチされていると思われますが、そうではありません。 –