Comments (7)
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 !/bin/bash
to see if that helps.
from flow-dashboard.
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
print 'Error: 2+ arguments required.'
to
print ('Error: 2+ arguments required.')
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!
from flow-dashboard.
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.
from flow-dashboard.
so when running the devapp server, I get this:
ERROR 2022-07-15 16:50:36,129 wsgi.py:267]
Traceback (most recent call last):
File "/home/myusername/flowdashboard-macs/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/runtime/wsgi.py", line 238, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/home/myusername/flowdashboard-macs/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/runtime/wsgi.py", line 309, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/home/myusername/flowdashboard-macs/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/runtime/wsgi.py", line 83, in LoadObject
obj = __import__(path[0])
File "/home/myusername/flowdashboard-macs/flow-dashboard/flow.py", line 7, in <module>
import api
File "/home/myusername/flowdashboard-macs/flow-dashboard/api.py", line 8, in <module>
from oauth2client import client
File "/home/myusername/flowdashboard-macs/flow-dashboard/lib/oauth2client/client.py", line 38, in <module>
from oauth2client import transport
File "/home/myusername/flowdashboard-macs/flow-dashboard/lib/oauth2client/transport.py", line 17, in <module>
import httplib2
File "/home/myusername/flowdashboard-macs/flow-dashboard/lib/httplib2/__init__.py", line 396
print("%s:" % h, end=" ", file=self._fp)
^
SyntaxError: invalid syntax
INFO 2022-07-15 16:50:36,135 module.py:890] default: "GET /_ah/warmup HTTP/1.1" 500 -
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
from flow-dashboard.
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 pip install -t lib
, you should have httplib2 in the ./lib
directory. Can you check its version by looking at the __version__
declaration at the top of the __init__.py
?
In my install, I'm seeing 0.10.3
. This is the version that was installed by the google_api_python_client
version 1.5.1, I believe.
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.
from flow-dashboard.
Thanks again.
Odd ... I have version = "0.20.4" in mine. I did install `from:
pip install -t lib -r requirements.txt pip install -r local.requirements.txt
my requirements.txt shows: google_api_python_client==1.5.1 too ...
from flow-dashboard.
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 pip install -t lib -r requirements.txt
command.
from flow-dashboard.
Related Issues (20)
- Delete habits and full history
- Sortable Habit Listings HOT 1
- tracking custom data HOT 1
- Projects with disabled progress cannot be opened HOT 3
- Better installation documentation HOT 1
- 'Failed To Validate' Error On Deployed App HOT 2
- Docker Image HOT 2
- Issue running locally with Authorization Error
- Habitica Integration
- Alternative Sign In HOT 3
- Simple task postponing / deferral
- Back tracking of habits HOT 1
- Facebook Messenger account linking is not working
- Support for unicode characters in exports
- Support for tracking total step counts (from Google Fit)
- Include number of habit completions in export
- Feature Request - Hability to select a habit as completed in the calendar view
- Support new Google Identity Services library
- Past days dashboard?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flow-dashboard.