-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloud Storage error on local dev server when invoking manage.py runserver #103
Comments
I don't think the app_identity_service stub is registered by default in djangoappengine.db.stubs. Try adding it. |
Thanks for the suggestion. It doesn't seem to fix the error. |
Are you running on the code from #78? |
Ahh, no. So it looks like the cloudstorage branch is based on the latest master commits including devappserver2. What settings.py config need to be added, as referenced in the commit comments? |
I rebased it off master a couple of days ago, and I merged the devappserver2 stuff in to master as well. You should add these to settings.py: APPENGINE_STORAGE_SERVICE = 'gs'
CLOUD_STORAGE_DEFAULT_BUCKET = '<bucket name goes here>' |
Still not working. Are you setting up your oauth token and project id using instructions here? |
Are you seeing this running locally only? I don't think I did any special setup with oauth tokens. |
Yes. I thought maybe it was using remote storage. So you're saying it is local storage. But then I don't know what this error is then? ERROR 2015-02-20 09:50:21,729 api_server.py:221] Exception while handling service_name: "app_identity_service" |
And also it works totally fine when launching the local dev server using sdk launcher. |
is there a stacktrace or something? it sounds like its just in some startup code. |
Yes, it turns into an infinite recursion as follows:
|
Did you add that |
Sorry, I don't understand what you mean? Isn't it calling remote api and raising an exception? |
Nevermind, I sometimes try to do clever things when I'm debugging appengine code, but I usually shoot myself in the foot when I do so. I thought you might be doing the same. 😁 I don't have any good ideas on what's causing this. I don't make use of the app_identity service myself, so I'm not sure how to best debug it. It sounds like you have a good work around tho. |
Are you using cloud storage in a different way without app identity? |
I don't think so. I'm using pretty much exactly whats in #78. I'm also using the latest djangotoolbox and django-nonrel 1.6.11, maybe that makes a difference? |
Yes I'm using those. Ok, so I'll give up on runserver command. Thanks. |
Despite what the comments in that ticket read, upgrading didn't work for me, up to |
Hi @Razzari, The only workaround I have now (on latest SDK version) is to run my development server via GAE SDK Launcher, rather than python manage.py runserver. As I use PyCharm IDE for development, it's baked into it. |
I tried that, from bash (Ubuntu), and was getting errors. |
Just ran into the same issue. The launcher solution worked for me. Below is the command line that the launcher uses to start up the dev environment.
Notice that
Does anyone know why |
Okay... the hypothesis led to a dead end. Two things I tried:
|
I have the same problem |
Okay, I think I figured it out. There may be two |
Since GAE SDK 1.9.18, I've been getting error using the cloudstorage api on my local dev server when starting server using command line manage.py runserver. It works fine when running via GAE launcher.
This is the error:
ERROR 2015-02-20 09:50:21,729 api_server.py:221] Exception while handling service_name: "app_identity_service"
method: "GetAccessToken"
request: "\n7https://www.googleapis.com/auth/devstorage.full_control"
request_id: "WoMrXkOyfe"
There was known issue in 1.9.18 affecting all GAE users (not just nonrel), but it was since fixed as discussed here:
http://stackoverflow.com/questions/28626222/using-gcs-in-gae-local-devserver
But still in 1.9.20, I'm seeing this error. Since it only occurs when using manage.py runserver, it seems like a bug in setting up stubs. Any ideas?
The text was updated successfully, but these errors were encountered: