pandemicsyn / asana Goto Github PK
View Code? Open in Web Editor NEWPython Asana API binding
License: Apache License 2.0
Python Asana API binding
License: Apache License 2.0
Hi
my python version - 2.7.3
and requests - 0.8.2
and i have this error and my fix is
if hasattr(r, 'text'):
return json.loads(r.text)['data']
else:
return json.loads(r.content)['data']
Need to setup travis-ci hooks.
Hi. I am trynig to run this on app engine. It works fine when I run it locally on my compture, but once on app engine I am getting the following error:
raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects)
TooManyRedirects: Exceeded 30 redirects.
I just placed the source in the file root. Everything works up until actually making the call. I can initialize the elements and what not, just not make the final call.
The last line of _asana()
should include a return
statement. Currently, if we retry, the function returns None
instead of the data we want. This occurs in several other places.
There are a few cases where the code raises an Exception
. But we have defined an AsanaException
class. Can we change it to always raise AsanaException
?
First off, love what you guys have done! Its great!
When I run list_tasks. I receive an error, is this a unicode related error?
"Received non 2xx or 404 status code on call"
How can I trouble shoot this error?
Thanks,
More about the error.
-> Calling: https://app.asana.com/api/1.0/workspaces
64****_76
-> Calling: https://app.asana.com/api/1.0/tasks?workspace=7072**_**049&assignee=d*****@gmail.com&include_archived=false
-> Got: 400
-> html>
head>
title>Error/title>script>FILE="(none)";var config = {
"CLUSTER": "prod",
"PRETTY_JS_CODEGEN": false,
"ENABLED_FEATURES": ""
};/script>link rel="shortcut icon" href="/-/static/luna/browser/images/favicon.ico" />
/head>
body>
h3>Error/h3>pre>No route found/pre>
/body>
/html>
Traceback (most recent call last):
File "C:\Users\Daniel**\getAllTasks.py", line 16, in module>
getAllTasks()
File "C:\Users\Daniel**\getAllTasks.py", line 9, in getAllTasks
taskList = asa.list_tasks(7072***1049, "d**@gmail.com")
File "C:\Users\Daniel_\asana.py", line 181, in list_tasks
return self.asana(target)
File "C:\Users\Daniel\asana.py", line 86, in _asana
if (self.handle_exception(r) > 0):
File "C:\Users\Daniel*\asana.py", line 53, in handle_exception
raise AsanaException('Received non 2xx or 404 status code on call')
asana.AsanaException: Received non 2xx or 404 status code on call
[Finished in 3.5s]
Added these for our needs. Here is a patch: https://gist.github.com/k8n/3c9479379a313d5a72b9
from asana import asana
File "H:\Scripts\Asana Projects Overview\asana\asana.py", line 47
print "-> Got: %s" % r.status_code
^
SyntaxError: invalid syntax
[Finished in 0.3s with exit code 1]
get_project_tasks does not return full records for tasks (strangely get_subtasks does). This mirrors the Asana API. Of course I could issue a get_task for each tasks, but that is slow when querying many tasks.
If, instead, one wants to get all tasks in 1 go and filter for project in python code one would use list_tasks. Unfortunately it requires a value for assignee, which is not desired.
So please make assignee an optional argument. I think the Asana API allows for this.
TIA
This is the culprit:
payload = {'assignee': assignee or 'me', 'name': name,
That makes it impossible to create a task w/o an assignee, which is a common case
How would you go about using this module behind an HTTPS proxy server?
Hi. I'm using python 2.7. Looks like sometimes in _ok_status() the status_code variable is being passed in as type long, and it ends up returning None. This was happening to me when testing locally and calling the list_workspaces() function. Right now I'm just forcing status_code to be an int as a workaround.
Could use some unitttests. Should be pretty straight forward with a little love from python-mock and MagicMock().
How can we use get_project_tasks to pull tasks from private project (not open to everyone)?
On lines 84-89 of asana.py, there is an explicit test for the existence of attribute .text and .content.
But the handlers for POST and PUT don't have these tests.
Those handlers will raise the exception when using older versions of the requests package. They should probably have the same tests as lines 84-89.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.