Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7912763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:41:21+00:00 2026-06-03T13:41:21+00:00

After somes problems with a simple import of httplib2 (see my post here ),

  • 0

After somes problems with a simple import of httplib2 (see my post here), i meet a different problem with the import of gflags.

In fact, on dev server, i have an ImportError the first time that I lanch the apps. But, if i refresh the browser, the apps works ! If i looking in logs, i can see :

...
ImportError: No module named gflags
[App Instance] [0] [dev_appserver.py:2891] INFO "GET / HTTP/1.1" 500 -
[App Instance] [0] [py_zipimport.py:148] INFO zipimporter('/usr/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg', '')
[App Instance] [0] [py_zipimport.py:148] INFO zipimporter('/usr/lib/python2.5/site-packages/python_gflags-2.0-py2.5.egg', '')

So, the apps works after a refresh on dev server but it doesn’t work at all after an upload on appspot :

<type 'exceptions.ImportError'>: No module named gflags
Traceback (most recent call last):
  File "/base/data/home/apps/s~yoyocontacts/2.358733066847060730/main.py", line 33, in <module>
from apiclient.discovery import build
  File "/base/data/home/apps/s~yoyocontacts/2.358733066847060730/apiclient/discovery.py", line 48, in <module>
from apiclient.http import HttpRequest
  File "/base/data/home/apps/s~yoyocontacts/2.358733066847060730/apiclient/http.py", line 47, in <module>
from model import JsonModel
  File "/base/data/home/apps/s~yoyocontacts/2.358733066847060730/apiclient/model.py", line 27, in <module>
import gflags

My application is this HelloWorld :

lrwxrwxrwx 1 yoyo   77 2012-05-06 16:24 apiclient -> /home/yoyo/dev/outils/google_appengine/lib/google-api-python-client/apiclient/
-rw-r--r-- 1 yoyo  169 2012-05-06 16:19 app.yaml
-rw-r--r-- 1 yoyo  358 2012-05-06 15:20 client_secrets.json
lrwxrwxrwx 1 yoyo   60 2012-05-07 12:12 gflags -> /home/yoyo/dev/outils/google_appengine/lib/python-gflags/
-rw-r--r-- 1 yoyo  554 2012-03-02 20:00 grant.html
lrwxrwxrwx 1 yoyo   60 2012-05-06 16:20 httplib2 -> /home/yoyo/dev/outils/google_appengine/lib/httplib2/httplib2/
-rw-r--r-- 1 yoyo  471 2012-03-02 20:00 index.yaml
-rw-r--r-- 1 yoyo 3,4K 2012-05-07 11:45 main.py
lrwxrwxrwx 1 yoyo   56 2012-05-06 16:24 oauth2 -> /home/yoyo/dev/outils/google_appengine/lib/oauth2/oauth2/
lrwxrwxrwx 1 yoyo   80 2012-05-07 10:59 oauth2client -> /home/yoyo/dev/outils/google_appengine/lib/google-api-python-client/oauth2client/
-rwxr-xr-x 1 yoyo  163 2012-05-07 11:14 run*
-rwxr-xr-x 1 yoyo  115 2012-05-07 11:50 upload*
lrwxrwxrwx 1 yoyo   79 2012-05-06 16:24 uritemplate -> /home/yoyo/dev/outils/google_appengine/lib/google-api-python-client/uritemplate/
-rw-r--r-- 1 yoyo  102 2012-03-02 20:00 welcome.html

My questions :

  • Why zipimporter works only after a refresh ?
  • How fix this error on appspot ?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:41:22+00:00Added an answer on June 3, 2026 at 1:41 pm

    Thans @greg.

    I added __init__.py with import gflags then I modified apiclient/model.py with from gflags import gflags instead of just import gflags.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Update: After some more reading I see that this problem is totally general, you
I've had some problems with a Django application after I deployed it. I use
after some advice regarding a problem i am getting using a linux based piece
After some painful experiences, I understand the problem of dangling pointers and double free.
I'm after some guidance on how to approach coding a problem, I don't want
I am actually after some ideas to how to address my problem below: I
I had a performance problem today that showed up after some profiling. Calls to
I have a small problem regarding a count after grouping some elements from a
I have this problem containing some inequations and requirement to minimize a value. After
Simple question here; I've got a list of stop words in a CSV text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.