coala / community

Generic re-usable community site
https://coala-community.netlify.app
GNU Affero General Public License v3.0
19 stars 45 forks source link

Affiliated Committers and Outside Projects are not being saved. #151

Open sks444 opened 6 years ago

sks444 commented 6 years ago

see: http://coala-community.netlify.com/model/openhub/affiliated_committers/ and http://coala-community.netlify.com/model/openhub/outside_projects/

Error from the log:

2018-06-12 14:01:20,408 [ERROR] openhub.management.commands.import_openhub_data: can only concatenate list (not "dict") to list
sks444 commented 6 years ago

The error is occurring in the file openhub/data.py, sometimes while fetching affiliator data is returning a dict. E.g.

{'name': 'Kilari Teja', 'kudos': '1', 'level': '1', 'most_recent_commit': {'date': 'May 2018', 'project': 'coala-projects'}, 'most_commits': {'commits': '5', 'project': 'coala-vs-code'}}

But the expected behaviour is it should return a list like the previous cases.

[{'name': 'Kilari Teja', 'kudos': '1', 'level': '1', 'most_recent_commit': {'date': 'May 2018', 'project': 'coala-projects'}, 'most_commits': {'commits': '5', 'project': 'coala-vs-code'}}]

This is the reason we are getting this error can only concatenate list (not "dict") to list.

A similar case is happening with outside projects.

jayvdb commented 6 years ago

@sks444 , why is it returning a dict sometimes and list other times?

This cant be random -- there must be some reason and it might be important.

sks444 commented 6 years ago

I found a pattern while looking at both the cases, explained at https://github.com/coala/community/pull/152#issuecomment-401027213