thash / asana

Asana command line Client
115 stars 25 forks source link

Error parsing json? #14

Open mikaylathompson opened 7 years ago

mikaylathompson commented 7 years ago

Listing tasks works, but getting info on a specific task fails, with an error that looks like a JSON parsing issue?

$ asana tasks
 0 [            ] Improve performance
 1 [            ] Add python profiling data
 2 [            ] Improve CI configuration

$ asana t 1
fatal: %v
json: cannot unmarshal object into Go value of type string

This error occurs on ~half of my tasks. I haven't yet been able to figure out what's different about these tasks, but will update if I figure it out. It fails in the same way whether I do asana task 1 or asana t 1 or asana t -v 1 or asana task -v 1.

Diagnostic info: macOS 10.12

$ brew info asana
memerelics/asana/asana: stable 0.2.0
https://github.com/memerelics/asana
/usr/local/Cellar/asana/0.2.0 (4 files, 7.6M) *
  Built from source on 2017-02-13 at 10:23:54
From: https://github.com/memerelics/homebrew-asana/blob/master/asana.rb
==> Dependencies
Build: go ✔
==> Requirements
Build: git ✔

$ brew info go 
go: stable 1.7.5 (bottled), devel 1.8rc3, HEAD
The Go programming language
https://golang.org
/usr/local/Cellar/go/1.7.5 (6,440 files, 250.8M) *
  Poured from bottle on 2017-02-13 at 10:23:46
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/go.rb
rmkaymusic commented 6 years ago

I have the same error message only it happens on every command I try. Would love to get this working if anyone finds a solution.

svbaelen commented 6 years ago

Same problem. Anyone found a solution?

dgsmith commented 5 years ago

Had the same problem, at least for me it was saying the Task_t struct field, Parent was to blame. Looking at the Asana API documentation, it seems Parent is now returning a structure with id, gid, and name, so I modified the structure to use a Base type (similar to other fields in the Task_t struct) here: https://github.com/thash/asana/pull/16