question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error:superset load_examples

See original GitHub issue

OS: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. image

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:closed
  • Created 3 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

18reactions
malone6commented, Sep 7, 2020

这个问题实际是由于初始化需要的数据是用github下载的,而在中国大陆访问有限制导致下载失败,如果你对python比较熟悉的话,不难调查出此问题。 image 解决办法就是是墙外从github下载样例数据,将数据在本地启动一个http文件服务,修改BASE_URL为本地地址即可,启动方式可以了解下python的内置库http.server,或者其他工具也可以

2reactions
geosmartcommented, Mar 10, 2021
  1. start a vpn server at localhost with http proxy
  2. set docker network= host add HTTPS_PROXY env to run superset container

example

sudo docker run -d --network host -p 8080:8080 --env HTTP_PROXY="http://127.0.0.1:7890" --env HTTPS_PROXY="http://127.0.0.1:7890" --name superset apache/superset  

docker setup detail at https://hub.docker.com/r/apache/superset

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apache Superset Installation - Load_Examples commad not ...
It seems that you're trying use command load_examples. But the right command written with dash — load-examples.
Read more >
Issue Code Reference - Apache Superset
This page lists issue codes that may be displayed in.
Read more >
Installation & Configuration - apache-superset - Read the Docs
Your Superset local instance also includes a Postgres server to store your data and is already pre-loaded with some example datasets that ship...
Read more >
airbnb/superset - Gitter
I am unable to install Superset due to failing Postgres error: ... when I type superset load-examples I get (<urlopen error [Errno 101]...
Read more >
Installation & Configuration — Superset's documentation ...
You may want to attempt the next step (“Superset installation and initialization”) and come back to this step if you encounter an error....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found