chaoss / augur

Python library and web service for Open Source Software Health and Sustainability metrics & data collection. You can find our documentation and new contributor information easily here: https://oss-augur.readthedocs.io/en/main/ and learn more about Augur at our website https://augurlabs.io
https://oss-augur.readthedocs.io/en/main/
MIT License
589 stars 845 forks source link

All graphs except Git are not working on dev install #198

Closed Nebrethar closed 5 years ago

Nebrethar commented 5 years ago

I've run into a kind of gridlock between graphs.

This is the error I get:

2018-12-11 11:14:06 PowerEdge-T320 flask.app[4739] ERROR Exception on /api/unstable/batch [POST]
Traceback (most recent call last):
  File "/home/nebrethar/.local/lib/python3.5/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/nebrethar/.local/lib/python3.5/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/nebrethar/.local/lib/python3.5/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/nebrethar/.local/lib/python3.5/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/nebrethar/.local/lib/python3.5/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/home/nebrethar/.local/lib/python3.5/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/nebrethar/.local/lib/python3.5/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/nebrethar/augur/augur/augur/server.py", line 95, in batch
    requests = json.loads(request.data)
  File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'

I've found these errors at lines 95 and 176 of augur/server.py

I've tried the regular fix for this, adding a section to each: json.loads(request.data) json.loads(request.data.decode('utf-8'))

At this point, all errors are gone but none of the graphs work, including Git.

ccarterlandis commented 5 years ago

I'm currently unable to reproduce this on dev. @Nebrethar would you try this again with the new version of dev and see if it still persists?

ccarterlandis commented 5 years ago

@Nebrethar have you made any progress concerning this?

sgoggins commented 5 years ago

@Nebrethar : Our theory is that there is an issue with credentials on ghtorrent database ... if you change the database to ghtorrent_blue, that will work ... its mid restore right now.

Sean