1

I am using Taiga (taiga.io) to handle my projects. I found that there's a python-based API which I am trying to use. I can create items in my projects but I cannot extract anything. When I try to extract data, I keep getting this error:

File "demo.py", line 54, in <module>
projects = api.projects.list()
File "/home/sc/.local/lib/python3.5/site-packages/taiga/models/base.py", 
line 41, in list
objects = self.parse_list(result.json())
File "/home/sc/.local/lib/python3.5/site-packages/requests/models.py", 
line 892, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I checked the access permissions, the projects slugs (which are there and I can create projects/users stories using the API without any problem!). Still this error appears every time I try to pull info from Taiga.

Any ideas? Thanks all in advance.

Best,

Zimo117

zimo117
  • 11
  • 2
  • Can you post your JSON result? It may be badly formatted. – Laurent LAPORTE Aug 23 '17 at 10:25
  • It is "hidden" in the API output ( self.parse_list(result.json()) ), and I don't see it directly (but I just see the error) – zimo117 Aug 23 '17 at 10:56
  • Seems you have no `project` in your `TaigaApi`. Does your `host='http://127.0.0.1:8000'` responds? – stovfl Aug 23 '17 at 15:45
  • That indeed was the problem. I tried to access the projects by shell via curl and I got "permanently moved". I checked and it turned out that you need to have https to get access, not just http. In this second case, the program wasn't simply finding anything and thus returning the json error. – zimo117 Aug 24 '17 at 16:36

0 Answers0