ImportError: cannot import name timegm

2009-02-26
2013-03-15
  • Greg Heidorn

    Greg Heidorn - 2009-02-26

    I am running PyDev on Leopard and when configuring my existing Google AppEngine project's run configuration, I get the following error:

    Traceback (most recent call last):

      File "/usr/local/google_appengine/dev_appserver.py", line 60, in <module>

        run_file(__file__, globals())

      File "/usr/local/google_appengine/dev_appserver.py", line 57, in run_file

        execfile(script_path, globals_)

      File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 463, in <module>

        sys.exit(main(sys.argv))

      File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 385, in main

        SetGlobals()

      File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 81, in SetGlobals

        from google.appengine.tools import appcfg

      File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 55, in <module>

        from google.appengine.tools import appengine_rpc

      File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 21, in <module>

        import cookielib

      File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/cookielib.py", line 37, in <module>

        from calendar import timegm

    ImportError: cannot import name timegm

    I've reconfigured a bunch of times but no luck.  I did notice that my forced built-in list seems a lot shorter (fewer modules) than my Vista installation.  Any help would be most appreciated!

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2009-02-26

      Have you configured your path as: http://code.google.com/appengine/articles/eclipse.html

      Cheers,

      Fabio

       
    • Greg Heidorn

      Greg Heidorn - 2009-02-27

      Yes, my system PYTHONPATH has the following System Libs:

      /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python
      /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC
      /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python2.5
      /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python2.5/lib-dynload
      /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python2.5/lib-tk
      /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python2.5/plat-darwin
      /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python2.5/plat-mac
      /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python2.5/plat-mac/lib-scriptpackages
      /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python2.5.zip

      My project PYTHONPATH has my project src directory and then the following external source folders:

      /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine
      /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django
      /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webob
      /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/yaml/lib

      Any of that look funny?

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2009-03-11

        Sorry for the delay... This got lost in my pile of things TODO.

        So, did you fix it? I was thinking... are you able to run it from the command line?

        Cheers,

        Fabio

         

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks