I have an AMI based install that I’ve upgrade from 1>2>3 using the upgrade script. Current Redash 3.0.0+b3134

In the last 24 hours one of my datasources went missing (mysql).

The following appears in the ami_error.log

[2018-01-09 22:05:14,408][PID:2357][ERROR][root] Error with DataSource#to_dict (data source id: 4)
Traceback (most recent call last):
File “/opt/redash/redash.3.0.0.b3134/redash/handlers/data_sources.py”, line 80, in get
d = ds.to_dict()
File “/opt/redash/redash.3.0.0.b3134/redash/models.py”, line 496, in to_dict
‘syntax’: self.query_runner.syntax,
AttributeError: ‘NoneType’ object has no attribute ‘syntax’

When I run sudo -u redash bin/run ./manage.py ds test datasourcename

I get the following error:

Testing connection to data source: datasourcename (id=4)
Failure: ‘NoneType’ object has no attribute ‘test_connection’

Any tips on how to fix this? I’ve confirmed that MySQL-python 1.2.5 is installed.


(note: I edited this to reflect that this didn’t happen in conjunction with an upgrade, just spontaneously)

Ok, fix was to follow the instructions outlined here:

sudo -H pip uninstall mysqlclient

sudo -H pip install --no-binary mysqlclient mysqlclient

I determined that import MySQLdb was failing.

1 Like