This is using the Python SDK version 1.8.0.
My remote API works fine using remote_api_shell.py
, but doesn't work when trying to accessing from within a python script. I'm using the sample code from google:
from google.appengine.ext.remote_api import remote_api_stub import getpass def auth_func(): return (raw_input('Username:'), getpass.getpass('Password:')) remote_api_stub.ConfigureRemoteApi(None, '/_ah/remote_api', auth_func, 'localhost:8080')
and I'm also importing the fix_sys_path()
from dev_appserver.py
to set my sys.path
correctly for the google app engine SDK:
import dev_appserver dev_appserver.fix_sys_path()
that adds, among other paths, the following line to my sys.path
:
'/google_appengine_1.8.0/lib/fancy_urllib'
However, the following error is thrown when the above call to remote_api_stub.ConfigureRemoteApi()
is called:
opener.add_handler(fancy_urllib.FancyProxyHandler()) AttributeError: 'module' object has no attribute 'FancyProxyHandler'
Running your application locallySelect File > Open to open the project you want to run. Browse to the directory containing your project. Select Tools > Cloud Code > App Engine Run on a local App Engine Standard dev server.
The caller does not have permission to access projectThis error occurs if the account that you used to deploy your app does not have permission to deploy apps for the current project. To resolve this issue, grant the App Engine Deployer ( roles/appengine. deployer ) role to the account.
Wait 7 years, and it all seems to work fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With