Error:superset load_examples
See original GitHub issueOS:CentOS Linux release 7.7.1908 (Core) I operate according to the manual。
-
pip install apache-superset
-
superset db upgrade
-
export FLASK_APP=superset
-
flask fab create-admin
It's fine up to here
-
superset load_examples
This is where the error starts
Expected results
Load some data to play with
Actual results
2020-04-08 10:22:09,186:INFO:root:logging was configured successfully 2020-04-08 10:22:09,578:INFO:root:Configured event logger of type <class ‘superset.utils.log.DBEventLogger’> Loading examples metadata and related data into examples Creating default CSS templates Loading energy related dataset 2020-04-08 10:22:11,688:INFO:root:Database.get_sqla_engine(). Masked URL: sqlite:////home/***/.superset/superset.db Creating table [wb_health_population] reference Loading [World Bank’s Health Nutrition and Population Stats] Traceback (most recent call last): File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 1319, in do_open encode_chunked=req.has_header(‘Transfer-encoding’)) File “/usr/local/python3/lib/python3.7/http/client.py”, line 1252, in request self._send_request(method, url, body, headers, encode_chunked) File “/usr/local/python3/lib/python3.7/http/client.py”, line 1298, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File “/usr/local/python3/lib/python3.7/http/client.py”, line 1247, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File “/usr/local/python3/lib/python3.7/http/client.py”, line 1026, in _send_output self.send(msg) File “/usr/local/python3/lib/python3.7/http/client.py”, line 966, in send self.connect() File “/usr/local/python3/lib/python3.7/http/client.py”, line 1414, in connect super().connect() File “/usr/local/python3/lib/python3.7/http/client.py”, line 938, in connect (self.host,self.port), self.timeout, self.source_address) File “/usr/local/python3/lib/python3.7/socket.py”, line 728, in create_connection raise err File “/usr/local/python3/lib/python3.7/socket.py”, line 716, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “/home//python37/bin/superset", line 31, in <module> cli() File "/home//python37/lib/python3.7/site-packages/click/core.py”, line 722, in call return self.main(args, kwargs) File "/home//python37/lib/python3.7/site-packages/flask/cli.py", line 586, in main return super(FlaskGroup, self).main(args, kwargs) File "/home//python37/lib/python3.7/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File “/home//python37/lib/python3.7/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home//python37/lib/python3.7/site-packages/click/core.py”, line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/home//python37/lib/python3.7/site-packages/click/core.py", line 535, in invoke return callback(args, kwargs) File "/home//python37/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), args, kwargs) File "/home//python37/lib/python3.7/site-packages/flask/cli.py", line 426, in decorator return __ctx.invoke(f, args, kwargs) File "/home//python37/lib/python3.7/site-packages/click/core.py", line 535, in invoke return callback(args, kwargs) File "/home//python37/lib/python3.7/site-packages/superset/cli.py", line 142, in load_examples load_examples_run(load_test_data, only_metadata, force) File "/home//python37/lib/python3.7/site-packages/superset/cli.py", line 86, in load_examples_run examples.load_world_bank_health_n_pop(only_metadata, force) File "/home//python37/lib/python3.7/site-packages/superset/examples/world_bank.py", line 52, in load_world_bank_health_n_pop data = get_example_data(“countries.json.gz”) File "/home/**/python37/lib/python3.7/site-packages/superset/examples/helpers.py", line 73, in get_example_data content = request.urlopen(f"{BASE_URL}{filepath}?raw=true").read() File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 222, in urlopen return opener.open(url, data, timeout) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 531, in open response = meth(req, response) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 641, in http_response ‘http’, request, response, code, msg, hdrs) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 563, in error result = self._call_chain(*args) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 503, in _call_chain result = func(*args) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 755, in http_error_302 return self.parent.open(new, timeout=req.timeout) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 531, in open response = meth(req, response) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 641, in http_response ‘http’, request, response, code, msg, hdrs) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 563, in error result = self._call_chain(*args) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 503, in _call_chain result = func(*args) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 755, in http_error_302 return self.parent.open(new, timeout=req.timeout) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 525, in open response = self._open(req, data) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 543, in _open ‘_open’, req) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 503, in _call_chain result = func(*args) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 1362, in https_open context=self._context, check_hostname=self._check_hostname) File “/usr/local/python3/lib/python3.7/urllib/request.py”, line 1321, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
Screenshots
If applicable, add screenshots to help explain your problem.
How to reproduce the bug
1 pip install apache-superset 2 superset db upgrade 3 export FLASK_APP=superset 4 flask fab create-admin 5 superset load_examples
Environment
(please complete the following information):
- superset version:
Superset 0.35.2
- python version:
Python 3.7.7
- node.js version:
uninstall
- npm version:
uninstall
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
- [N] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [N] I have reproduced the issue with at least the latest released version of superset.
- [N] I have checked the issue tracker for the same issue and I haven’t found one similar.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (1 by maintainers)
Top GitHub Comments
这个问题实际是由于初始化需要的数据是用github下载的,而在中国大陆访问有限制导致下载失败,如果你对python比较熟悉的话,不难调查出此问题。 解决办法就是是墙外从github下载样例数据,将数据在本地启动一个http文件服务,修改BASE_URL为本地地址即可,启动方式可以了解下python的内置库http.server,或者其他工具也可以
example
docker setup detail at https://hub.docker.com/r/apache/superset