Obsolete
Status Update
Comments
bq...@google.com <bq...@google.com>
mi...@gmail.com <mi...@gmail.com> #2
[Comment deleted]
mi...@gmail.com <mi...@gmail.com> #3
I confirm the issue - have the same problem. Seems like SetupEnvironment is not called.
[Deleted User] <[Deleted User]> #4
is there a workaround until a fixed version gets released?
Thanks,
Shay
Thanks,
Shay
mi...@gmail.com <mi...@gmail.com> #5
It's brutal, but works for now.
[Deleted User] <[Deleted User]> #6
thanks, the patch works perfectly
[Deleted User] <[Deleted User]> #7
I am not sure how to use this patch - I tried adding using this code and modifying server.py. But does not work for me. Any advise ?
[Deleted User] <[Deleted User]> #8
to apply this patch
cd to the location where you extracted google_appengine folder
and run
patch -p 1 < [path to patch]/gae.patch
cd to the location where you extracted google_appengine folder
and run
patch -p 1 < [path to patch]/gae.patch
[Deleted User] <[Deleted User]> #9
Works ! Thank you.
va...@gmail.com <va...@gmail.com> #10
I have the same issue.
However, I'm running on Windows and I can't get the patch to work? Apologies, but can you please provide more detailed instructions?
Thanks!
However, I'm running on Windows and I can't get the patch to work? Apologies, but can you please provide more detailed instructions?
Thanks!
an...@gmail.com <an...@gmail.com> #11
Windows x64, GAE 1.8.0, same problem. The patch from #5 helped, thanks!
[Deleted User] <[Deleted User]> #12
I am newer to appenigne , I have executed this command
patch -p 1 < [path to patch]/gae.patch
Now it is asking me FILE TO PATCH ? Which file should i patch ?
patch -p 1 < [path to patch]/gae.patch
Now it is asking me FILE TO PATCH ? Which file should i patch ?
sh...@gmail.com <sh...@gmail.com> #13
The patch is no longer required, it just works on the latest version
[Deleted User] <[Deleted User]> #14
Strange, still doesn't work for me on 1.8.0 out of the box. Applied the patch again and now working fine.
[Deleted User] <[Deleted User]> #15
Hello.
I am having the same issue again after downloading the version 1.8.3 - the old patch is not working now as there is no server.py (upon trying to apply to api_server.py, it failed).
Help ?
I am having the same issue again after downloading the version 1.8.3 - the old patch is not working now as there is no server.py (upon trying to apply to api_server.py, it failed).
Help ?
pa...@gmail.com <pa...@gmail.com> #16
It does not work because the path to server.py file is different than the default set inside the GAE.patch file. If you run GAE.patch you will see that it asks for path to file. You can search the server.py file in your google_appengine folder, and feed this path to the terminal. It will work.
[Deleted User] <[Deleted User]> #17
Where is server.py ?
It is not traceable in my google_appengine/ folder in the most recent 1.8.5 release ! Can you tell me relative position of it w.r.t. google_appengine/ folder ? THx.
It is not traceable in my google_appengine/ folder in the most recent 1.8.5 release ! Can you tell me relative position of it w.r.t. google_appengine/ folder ? THx.
[Deleted User] <[Deleted User]> #18
Ditto. Same behavior and no server.py file to which the patch can be applied.
GAE 1.8.6.1041, Django 1.5, and Python 2.7
GAE 1.8.6.1041, Django 1.5, and Python 2.7
an...@gmail.com <an...@gmail.com> #19
This functionality has moved to google/appengine/tools/devappserver2/module.py
I'm not sure if the patch can still be applied directly, I just manually added the changes in the patch file and everything works.
I'm not sure if the patch can still be applied directly, I just manually added the changes in the patch file and everything works.
[Deleted User] <[Deleted User]> #20
Thanks for that note.
I haven't applied the fix yet, but I will confirm after testing.
I haven't applied the fix yet, but I will confirm after testing.
pa...@gmail.com <pa...@gmail.com> #21
Running google_appengine 1.8.7 and have to apply the patch to get it work.
my steps>
1. copy gae.patch to my root folder
2. in terminal run >
cd /usr/local/google_appengine
patch -p 1 < ~/gae.patch
note: type> File to patch: google/appengine/tools/devappserver2/module.py
result..
patching file google/appengine/tools/devappserver2/module.py
Hunk #1 succeeded at 93 (offset 6 lines).
Hunk #2 succeeded at 299 with fuzz 1 (offset 30 lines).
Succeeded.. it works.
Thanks
Paulo
my steps>
1. copy gae.patch to my root folder
2. in terminal run >
cd /usr/local/google_appengine
patch -p 1 < ~/gae.patch
note: type> File to patch: google/appengine/tools/devappserver2/module.py
result..
patching file google/appengine/tools/devappserver2/module.py
Hunk #1 succeeded at 93 (offset 6 lines).
Hunk #2 succeeded at 299 with fuzz 1 (offset 30 lines).
Succeeded.. it works.
Thanks
Paulo
[Deleted User] <[Deleted User]> #22
[Comment deleted]
ne...@gmail.com <ne...@gmail.com> #23
Running google_appengine 1.8.8 and have to apply the patch to get it to work.
Followed steps as listed by Paulo.
Shouldn't there be a command line switch for dev_appserver.py to take the .googlesql_oauth2.dat file?
Raj.
Followed steps as listed by Paulo.
Shouldn't there be a command line switch for dev_appserver.py to take the .googlesql_oauth2.dat file?
Raj.
mi...@meelupblue.com <mi...@meelupblue.com> #24
Has anyone created a patch for the new version 1.9.0?
pp...@gmail.com <pp...@gmail.com> #25
I got the same error. After checking the source I found out that the GOOGLE_SQL_OAUTH2_REFRESH_TOKEN environment variable was not set. What I did to solve it:
1) copy the refresh_token from the google oauth .dat json file
2) added in app.yaml:
env_variables:
GOOGLE_SQL_OAUTH2_REFRESH_TOKEN: "here the copied token"
1) copy the refresh_token from the google oauth .dat json file
2) added in app.yaml:
env_variables:
GOOGLE_SQL_OAUTH2_REFRESH_TOKEN: "here the copied token"
fo...@gmail.com <fo...@gmail.com> #26
I'm getting this error because my existing token expired, but there are no directions to update this token. Anyone have any pointers to the process of re-authing and getting an updated token?
fo...@gmail.com <fo...@gmail.com> #27
I found that deleting the old token and then running syncdb causes the Oauth2 process to run again, but it keeps saving a token with the same expiration date, which has already passed? WTF?
fo...@gmail.com <fo...@gmail.com> #28
Anyone have any recent insights on this? I have some data validation I need to do, but I basically can't because I can't connect to the database from the dev_server.
js...@google.com <js...@google.com> #29
The current documentation encourages users to use the vanilla MySQLdb backend connectivity in Django when connecting to a Cloud SQL database from dev_appserver. I'm marking this issue as obsolete. If you have problems with the MySQLdb approach, please file a new report describing the issue.
https://cloud.google.com/appengine/docs/python/cloud-sql/django#development-settings
Description
ImproperlyConfigured: No valid OAuth 2.0 credentials. Before using the Google SQL Service backend on dev_appserver, you must first run "manage.py syncdb" and proceed through the given instructions to fetch an OAuth 2.0 token.
I already have the .googlesql_oauth2.dat file in my home directory - I tried removing it and then running manage.py syncdb as suggested in the documentation which re-created the file, however dev_appserver still raises the above exception.
Stack trace:
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django-1.4/django/db/models/query.py", line 87, in __len__
self._result_cache.extend(self._iter)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django-1.4/django/db/models/query.py", line 962, in iterator
for row in self.query.get_compiler(self.db).results_iter():
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django-1.4/django/db/models/sql/compiler.py", line 763, in results_iter
for rows in self.execute_sql(MULTI):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django-1.4/django/db/models/sql/compiler.py", line 817, in execute_sql
cursor = self.connection.cursor()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django-1.4/django/db/backends/__init__.py", line 306, in cursor
cursor = self.make_debug_cursor(self._cursor())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/storage/speckle/python/django/backend/base.py", line 275, in _cursor
self.connection = Connect(**kwargs)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/storage/speckle/python/django/backend/base.py", line 189, in Connect
'No valid OAuth 2.0 credentials. Before using the Google SQL '
ImproperlyConfigured: No valid OAuth 2.0 credentials. Before using the Google SQL Service backend on dev_appserver, you must first run "manage.py syncdb" and proceed through the given instructions to fetch an OAuth 2.0 token.