-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
two copies of pyasn1_modules in $PYTHONPATH; doesn't work with remote_api_shell.py #2895
Comments
High-level: why are you using the remote API shell to import @jonparrott is our resident GAE expert, though I'll try to help. We should probably move this issue over to https://github.com/GoogleCloudPlatform/google-auth-library-python/ though since the issue is with the auth library (not really though, since it's just a PYTHONPATH issue). From the remote API shell, execute the following: >>> import pyasn1_modules
>>> pyasn1_modules
<module 'pyasn1_modules' from '/usr/local/lib/python2.7/dist-packages/pyasn1_modules/__init__.pyc'>
>>> pyasn1_modules.__file__
'/usr/local/lib/python2.7/dist-packages/pyasn1_modules/__init__.pyc' |
I recently had a bug in my deployed application where some datastore entities were out of sync with their related files on cloud storage. I used the remote API shell to loop over the affected objects, figure out if the referenced files existed, and fix up the objects. I ended up using For me, your commands point to
I don't have |
@faried Great, it's possible that What I really think is happening: the remote shell pre-loads a bunch of stuff, some of which imports You can run |
@faried I am pre-emptively closing out (so I don't forget to sweep it up later). LMK if this doesn't work and we can re-open. |
It does. I can't find a recent copy of import os
import sys
import time
sys_path = sys.path
try:
sys.path = [os.path.dirname(__file__)] + sys.path
import wrapper_util
finally:
sys.path = sys_path If I run Your suggestion of running I don't know where the appengine repository is, but I think an issue should be created there to update their copy of |
Thanks for the info @faried. @jonparrott Where to report |
Python 2.7.13 on Mac OS 10.11.6, with google-cloud 0.22.0, Cloud SDK 138.0.0.
Installing
google-cloud
using pip downloads and installspyasn1_modules
as a dependency, but it is newer than the one that ships with the platform.For my managed App Engine project, I use the vendor system. My
appengine_config.py
hasI installed
google-cloud
usingmkdir lib; pip install -t lib google-python
and my service works fine both when deployed and when I usedev_appserver
on my computer. However, I can't seem to usegoogle-cloud
withremote_api_shell.py
:It looks like I have
pyasn1_modules
both in my lib directory (installed as a dependency forgoogle-cloud
) and in/Users/fn/google-cloud-sdk/platform/google_appengine/lib/pyasn1_modules/pyasn1_modules/
The former has
pem.py
but the latter doesn't.The text was updated successfully, but these errors were encountered: