-
Notifications
You must be signed in to change notification settings - Fork 186
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
Deploy Failure - Bad substitution #143
Comments
It looks like this error can arise when running the scripts with something other than bash. If so, I wonder if this is related to the shell configuration in your container, as implied by this SO question. Might be worth trying running the script explicitly with bash, and also changing the hash bang to |
Thanks! That was the issue. Changing the hash bang to !/bin/bash worked. (or running bash ./deploy.sh 0-1) I then had to specify my python path at the top of the runtest.py (my container had nothing at /usr/bin/python) I then ran into an error that was solved by changing line 41 in runtests.py from I also had to modify run_tests.sh to properly specify my google-sdk path - which wasn't in my home folder. Now I have another exception ... but before I keep hammering away at this: I noticed the devappserver won't run locally because one of the libraries doesn't support python2.7 any more. I think I am running python3.8 for all of the above ... is it reasonable to assume this app will run on Ubuntu 20.04? Thanks! |
Thanks for that, I'm updating the bash script accordingly as well. As for the new exception, it's true that we're still using the python2.7 runtime in gcloud. However, I'm able to run the dev app server locally (on a mac) without issue, as well as execute deploys to production. Which library are you seeing lack of support? It could be that there are support differences on Ubuntu. In general, this codebase is in bad need of a refresh and upgrade to Python 3, and it's just not something I have time for at the moment, unfortunately. |
so when running the devapp server, I get this:
Googling I found this thread: Thanks again for the support! I have no coding experience/training so I not sure I could help. Is migrating to python3 a big job? Could something like this work? https://docs.python.org/3/library/2to3.html |
The github issue linked from the SO question you linked (googleapis/google-api-python-client#704) does seem to imply there is still support for python 2 in older versions of httplib. If you installed the python dependencies using In my install, I'm seeing As for upgrading to python3, unfortunately it's not as easy as updating the code itself (which as you found, is quite manageable). It's the dependencies (with the google python api client as a good example) and use of various GCP libraries and APIs that would need to be updated as well, which makes it a bigger task. All doable, of course. |
Thanks again. Odd ... I have version = "0.20.4" in mine. I did install `from:
my requirements.txt shows: google_api_python_client==1.5.1 too ... |
Ok, I think it's worth a try then to downgrade httplib2. You should be able to do this by deleting the urllib2 folder from lib, adding httplib2==0.10.3 to requirements.txt at the top, and then re-running the |
Hi! First of all, thanks for the great project! Excited to try this out.
I am new to gcp but think I have managed to stumble through all the right setup. I can successfully deploy the dev app server (although I can't actually check the app using localhost since I setup the dev environment on a headless lxc container - I can see it listening on 8080 and 8000.
When I try to deploy to google-cloud ... using scripts/deploy 0-1, I get:
52: Bad substitution
Any thoughts? (I did see the same issue in the "installation problem" issues ... but it seems the goal there was to get the devapp server going and that error was never addressed...
Thanks!
The text was updated successfully, but these errors were encountered: