superset: Upload a CSV, not working with MySQL
Make sure these boxes are checked before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if any
- I have reproduced the issue with at least the latest released version of superset
- I have checked the issue tracker for the same issue and I haven’t found one similar
Superset version
0.22.1
Expected results
CSV upload should create new table and load data into mysql
Actual results
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1615, in full_dispatch_request
return self.finalize_request(rv)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1632, in finalize_request
response = self.process_response(response)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1858, in process_response
self.save_session(ctx.session, response)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 924, in save_session
return self.session_interface.save_session(self, session, response)
File "/usr/local/lib/python3.5/dist-packages/flask/sessions.py", line 363, in save_session
val = self.get_signing_serializer(app).dumps(dict(session))
File "/usr/local/lib/python3.5/dist-packages/itsdangerous.py", line 565, in dumps
payload = want_bytes(self.dump_payload(obj))
File "/usr/local/lib/python3.5/dist-packages/itsdangerous.py", line 847, in dump_payload
json = super(URLSafeSerializerMixin, self).dump_payload(obj)
File "/usr/local/lib/python3.5/dist-packages/itsdangerous.py", line 550, in dump_payload
return want_bytes(self.serializer.dumps(obj))
File "/usr/local/lib/python3.5/dist-packages/flask/sessions.py", line 85, in dumps
return json.dumps(_tag(value), separators=(',', ':'))
File "/usr/local/lib/python3.5/dist-packages/flask/json.py", line 123, in dumps
rv = _json.dumps(obj, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/simplejson/__init__.py", line 397, in dumps
**kw).encode(obj)
File "/usr/local/lib/python3.5/dist-packages/simplejson/encoder.py", line 291, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python3.5/dist-packages/simplejson/encoder.py", line 373, in iterencode
return _iterencode(o, 0)
File "/usr/local/lib/python3.5/dist-packages/flask/json.py", line 80, in default
return _json.JSONEncoder.default(self, o)
File "/usr/local/lib/python3.5/dist-packages/simplejson/encoder.py", line 268, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: OperationalError('(_mysql_exceptions.OperationalError) (1045, "Access denied for user \'superset\'@\'172.21.0.4\' (using password: YES)")',) is not JSON serializable
Steps to reproduce
I’m using the following docker image : https://github.com/amancevice/superset
add the following to mysql/supertset_config.py
UPLOAD_FOLDER='/tmp/'
I created a new database called TEST and ensured the user has permissions to do stuff with this schema:
GRANT ALL PRIVILEGES ON TEST.* TO ‘superset’@‘%’ WITH GRANT OPTION;
Password was set to superset and I can prove external connection by using sql workbench (external client) to connect directly to the mysql container.

CSV file called x.csv contained the following
XXXXXX,YYYYYYY
1,2
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 20 (6 by maintainers)
Also getting similar error message ([Errno 13] Permission denied: ‘/usr/local/lib/python3.5/site-packages/superset/app’) despite updating to newest version.
I ran this command and it worked sudo docker exec -u 0 -it superset chown superset /usr/local/lib/python3.5/dist-packages/superset
I have a very similar issue, where “Upload a csv” form yields this error
/usr/local/lib/python3.6/site-packages/superset/app/static/uploads/data.csv'even though the path for the data is different. Further, /usr/local/lib/python3.6/site-packages/superset/app/static/uploads does not seem to exist. There is no ‘app’ folder in the superset folder.
I had the same problem and solved it properly by changing the path where Superset uploads the CSV.
Here is Stackoverflow answer that worked for me.
in superset_config.py I also commented out the line - …/…/superset:/home/superset/superset and it worked.