Ich versuche Nase (NaseGAE) zu verwenden, um meine GAE-App zu testen, aber es schlägt mit einem Importfehler fehl. kann nicht wirklich verstehen, warum, weil was es nicht importiert Python Builtin Zeug ist. Ich teste tatsächlich eine einfache wsgi App mit 1 Handler, der 'Hallo Welt' ausschreibt.nosetests 'kann Name nicht importieren mkdir'
kann jemand verstehen, was los ist? im auf Mac OS X Snow Leopard
das ist die Zurückverfolgungs:
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
eine Lösung gefunden. Ich habe nose und nose-gae für das System python entfernt und für python2.5 installiert, das über Macports installiert wurde. Jetzt funktioniert es und testet die App. – aschmid00