-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add files via upload #3
base: master
Are you sure you want to change the base?
Conversation
Updated to Python 3.7.0 and updated URLLIB library syntax. Added some Heroku specific files to create python environment. You could optionally integrate and build on the asana-python tool (pip asana install). See Asana API Quick Start guide.
Hi @danelige. Thanks for this update! You haven't added added the requirements.txt, what should I put in it? I'm having trouble deploying via Heroku dash. |
Does your code still work @danelige? This is the error it throws up when I run asana_reminders.py in Heroku:
|
Code working like a charm. I just forgot to be more explicit about the fact
that I limited the robot to user = George (me). This is to avoid flooding
the team with messages initially. On line 99 of the code, you will find the
IF statement. Delete it if you want to send to all users or add your name
to make it just you... Hope it works.
…On Thu, May 2, 2019 at 8:23 AM a-bs ***@***.***> wrote:
Does your code still work @danelige <https://github.com/danelige>? This
is the error it throws up when I run asana_reminders.py in Heroku:
2019-05-02T00:21:24.270095+00:00 app[scheduler.2120]: API requested from
:::::: https://app.asana.com/api/1.0/users
2019-05-02T00:21:24.309839+00:00 app[scheduler.2120]: Traceback (most
recent call last): 2019-05-02T00:21:24.309846+00:00 app[scheduler.2120]:
File "asana_reminders.py", line 95, in <module>
2019-05-02T00:21:24.310023+00:00 app[scheduler.2120]: users =
data_for('/users') 2019-05-02T00:21:24.310028+00:00 app[scheduler.2120]:
File "asana_reminders.py", line 72, in data_for
2019-05-02T00:21:24.310160+00:00 app[scheduler.2120]: result =
urllib.request.urlopen(request) 2019-05-02T00:21:24.310167+00:00
app[scheduler.2120]: File
"/app/.heroku/python/lib/python3.7/urllib/request.py", line 222, in urlopen
2019-05-02T00:21:24.310438+00:00 app[scheduler.2120]: return
opener.open(url, data, timeout) 2019-05-02T00:21:24.310444+00:00
app[scheduler.2120]: File
"/app/.heroku/python/lib/python3.7/urllib/request.py", line 531, in open
2019-05-02T00:21:24.310767+00:00 app[scheduler.2120]: response = meth(req,
response) 2019-05-02T00:21:24.310771+00:00 app[scheduler.2120]: File
"/app/.heroku/python/lib/python3.7/urllib/request.py", line 641, in
http_response 2019-05-02T00:21:24.311090+00:00 app[scheduler.2120]: 'http',
request, response, code, msg, hdrs) 2019-05-02T00:21:24.311096+00:00
app[scheduler.2120]: File
"/app/.heroku/python/lib/python3.7/urllib/request.py", line 569, in error
2019-05-02T00:21:24.311432+00:00 app[scheduler.2120]: return
self._call_chain(*args) 2019-05-02T00:21:24.311438+00:00
app[scheduler.2120]: File
"/app/.heroku/python/lib/python3.7/urllib/request.py", line 503, in
_call_chain 2019-05-02T00:21:24.311765+00:00 app[scheduler.2120]: result =
func(*args) 2019-05-02T00:21:24.311767+00:00 app[scheduler.2120]: File
"/app/.heroku/python/lib/python3.7/urllib/request.py", line 649, in
http_error_default 2019-05-02T00:21:24.312071+00:00 app[scheduler.2120]:
raise HTTPError(req.full_url, code, msg, hdrs, fp)
2019-05-02T00:21:24.312136+00:00 app[scheduler.2120]:
urllib.error.HTTPError: HTTP Error 401: Unauthorized
2019-05-02T00:21:24.367131+00:00 heroku[scheduler.2120]: Process exited
with status 1
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFBIEMKH2H3K7NCUCPBREKLPTIYABANCNFSM4GOCX37Q>
.
|
|
Thank you for your work. Took your base but needed significant updating.
Updated to Python 3.7.0 and updated URLLIB library syntax. Optimally though all this should run off REQUESTS library nowadays... so thats the next step: http://docs.python-requests.org/en/latest/index.html
Added some Heroku specific files to create python environment.
Procfile
requirements
runtime
Added a short testing script to see that python connected to asana: asana_test.py
You could optionally integrate and build on the asana-python tool (pip asana install). See Asana API Quick Start guide.