Permission Denied while installing Airflow via Docker - linux

https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html
I am following the above installation guide. At the step where it says:
echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" > .env
I think it's supposed to create a .env file, but it isn't creating anything for me. If i use the ls command .env doesn't show up.
If i try to move on to the next step:
docker-compose up airflow-init
I get the following error:
Traceback (most recent call last):
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1277, in request
File "http/client.py", line 1323, in _send_request
File "http/client.py", line 1272, in endheaders
File "http/client.py", line 1032, in _send_output
File "http/client.py", line 972, in send
File "docker/transport/unixconn.py", line 43, in connect
PermissionError: [Errno 13] Permission denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "requests/adapters.py", line 449, in send
File "urllib3/connectionpool.py", line 727, in urlopen
File "urllib3/util/retry.py", line 410, in increment
File "urllib3/packages/six.py", line 734, in reraise
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1277, in request
File "http/client.py", line 1323, in _send_request
File "http/client.py", line 1272, in endheaders
File "http/client.py", line 1032, in _send_output
File "http/client.py", line 972, in send
File "docker/transport/unixconn.py", line 43, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker/api/client.py", line 214, in _retrieve_server_version
File "docker/api/daemon.py", line 181, in version
File "docker/utils/decorators.py", line 46, in inner
File "docker/api/client.py", line 237, in _get
File "requests/sessions.py", line 543, in get
File "requests/sessions.py", line 530, in request
File "requests/sessions.py", line 643, in send
File "requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose/cli/main.py", line 81, in main
File "compose/cli/main.py", line 199, in perform_command
File "compose/cli/command.py", line 70, in project_from_options
File "compose/cli/command.py", line 153, in get_project
File "compose/cli/docker_client.py", line 43, in get_client
File "compose/cli/docker_client.py", line 170, in docker_client
File "docker/api/client.py", line 197, in __init__
File "docker/api/client.py", line 222, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
[22636] Failed to execute script docker-compose
I am using Ubuntu 20.04 on an AWS EC2 instance.

Regarding the .env file, it might not be visible with just the ls command, but probably is there. Try to execute ls -a to also show hidden files. Files starting with . are hidden by default.
I think your second issue is a permission issue with docker-compose. Try running sudo docker-compose up airflow-init instead, or add your user to the docker group.

Related

Parsing/Writing SysML v2?

I'm trying to find an existing parser (preferably in Python) to write and read SysML v2.
The official Github repo by SysML v2 Submission Team (SST) has placed some examples online already (For instance https://github.com/Systems-Modeling/SysML-v2-Release/blob/master/sysml/src/examples/Vehicle%20Example/VehicleUsages.sysml ), but I'm unable to get the Eclipse Plugin running properly. (Nothing is shown in the preview windows, no error message either).
There's a repo for the SysML-v2-API-Python-Client which I installed and executed the given sample code (https://github.com/Systems-Modeling/SysML-v2-API-Python-Client), but all I'm getting is this message:
$ python3.8 Test1.py
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 74, 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 "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.8/http/client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1302, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1251, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1011, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 951, in send
self.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 187, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f9492d1b9a0>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Test1.py", line 38, in <module>
api_response = api_instance.delete_branch_by_project_and_id(
File "/home/qohelet/.local/lib/python3.8/site-packages/sysml_v2_api_client-2021.post9-py3.8.egg/sysml_v2_api_client/api/branch_api.py", line 62, in delete_branch_by_project_and_id
File "/home/qohelet/.local/lib/python3.8/site-packages/sysml_v2_api_client-2021.post9-py3.8.egg/sysml_v2_api_client/api/branch_api.py", line 144, in delete_branch_by_project_and_id_with_http_info
File "/home/qohelet/.local/lib/python3.8/site-packages/sysml_v2_api_client-2021.post9-py3.8.egg/sysml_v2_api_client/api_client.py", line 364, in call_api
File "/home/qohelet/.local/lib/python3.8/site-packages/sysml_v2_api_client-2021.post9-py3.8.egg/sysml_v2_api_client/api_client.py", line 181, in __call_api
File "/home/qohelet/.local/lib/python3.8/site-packages/sysml_v2_api_client-2021.post9-py3.8.egg/sysml_v2_api_client/api_client.py", line 431, in request
File "/home/qohelet/.local/lib/python3.8/site-packages/sysml_v2_api_client-2021.post9-py3.8.egg/sysml_v2_api_client/rest.py", line 256, in DELETE
File "/home/qohelet/.local/lib/python3.8/site-packages/sysml_v2_api_client-2021.post9-py3.8.egg/sysml_v2_api_client/rest.py", line 163, in request
File "/usr/lib/python3/dist-packages/urllib3/request.py", line 75, in request
return self.request_encode_url(
File "/usr/lib/python3/dist-packages/urllib3/request.py", line 97, in request_encode_url
return self.urlopen(method, url, **extra_kw)
File "/usr/lib/python3/dist-packages/urllib3/poolmanager.py", line 330, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 747, in urlopen
return self.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 747, in urlopen
return self.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 747, in urlopen
return self.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /projects/project_id_example/branches/branch_id_example (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9492d1b9a0>: Failed to establish a new connection: [Errno 111] Connection refused'))
Am I supposed to have anything running? Is there anywhere a tutorial or manual on how to use it?
Or are there any other parsers out there?
There are no parsers currently available for Python. The API Python Client is an example implementation to interact with the Pilot Server API Implementation. You would need to run the server to interact with the API using the python client.

npm run serve works but docker-compose fails

I'm trying to test a containerized app on my local machine. The app uses a combination of ruby on rails and vue code. If I run "npm run serve" it will fire up a server and I can connect to it locally in a browser (ex. "http://localhost:xxxx/")
If I try to run "docker-compose up -d" I get the error messages below.
Does anyone see what the issue might be? The code was developed for linux but I'm testing on mac, if that makes a difference.
working version:
npm run serve
failed version with error:
$ docker-compose up -d
Traceback (most recent call last):
File "urllib3/connectionpool.py", line 670, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1255, in request
File "http/client.py", line 1301, in _send_request
File "http/client.py", line 1250, in endheaders
File "http/client.py", line 1010, in _send_output
File "http/client.py", line 950, in send
File "docker/transport/unixconn.py", line 43, in connect
ConnectionRefusedError: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "requests/adapters.py", line 439, in send
File "urllib3/connectionpool.py", line 726, in urlopen
File "urllib3/util/retry.py", line 410, in increment
File "urllib3/packages/six.py", line 734, in reraise
File "urllib3/connectionpool.py", line 670, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1255, in request
File "http/client.py", line 1301, in _send_request
File "http/client.py", line 1250, in endheaders
File "http/client.py", line 1010, in _send_output
File "http/client.py", line 950, in send
File "docker/transport/unixconn.py", line 43, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker/api/client.py", line 214, in _retrieve_server_version
File "docker/api/daemon.py", line 181, in version
File "docker/utils/decorators.py", line 46, in inner
File "docker/api/client.py", line 237, in _get
File "requests/sessions.py", line 543, in get
File "requests/sessions.py", line 530, in request
File "requests/sessions.py", line 643, in send
File "requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose/cli/main.py", line 81, in main
File "compose/cli/main.py", line 200, in perform_command
File "compose/cli/command.py", line 60, in project_from_options
File "compose/cli/command.py", line 152, in get_project
File "compose/cli/docker_client.py", line 41, in get_client
File "compose/cli/docker_client.py", line 170, in docker_client
File "docker/api/client.py", line 197, in __init__
File "docker/api/client.py", line 221, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))
[55686] Failed to execute script docker-compose
figured it out, had to have docker engine running before I tried to run docker-compose.

requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')

Anyone has an idea how I can solve this error?
I am trying to download data and I have connected a posgresql server with the database navigator as localhost. Files are successfully downloaded for like 3 minutes and than suddenly the download stops and returns this error message:
.
..
...
run_filing 201500419349300305
run_filing 201540439349301594
Traceback (most recent call last):
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 421, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 416, in _make_request
httplib_response = conn.getresponse()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/urllib3/util/retry.py", line 400, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/urllib3/packages/six.py", line 734, in reraise
raise value.with_traceback(tb)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 421, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/urllib3/connectionpool.py", line 416, in _make_request
httplib_response = conn.getresponse()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Georg/PycharmProjects/990-xml-database/irsdb/manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/django/core/management/base.py", line 328, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/django/core/management/base.py", line 369, in execute
output = self.handle(*args, **options)
File "/Users/Georg/PycharmProjects/990-xml-database/irsdb/return/management/commands/load_filings.py", line 123, in handle
self.run_filing(filing)
File "/Users/Georg/PycharmProjects/990-xml-database/irsdb/return/management/commands/load_filings.py", line 65, in run_filing
parsed_filing = self.xml_runner.run_filing(object_id)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/irsx/xmlrunner.py", line 111, in run_filing
this_filing.process(verbose=verbose)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/irsx/filing.py", line 232, in process
self._download(verbose=verbose)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/irsx/filing.py", line 70, in _download
stream_download(self.URL, self.filepath, verbose=verbose)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/irsx/file_utils.py", line 22, in stream_download
response = requests.get(url, stream=True)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/Users/Georg/PycharmProjects/990-xml-database/venv/lib/python3.6/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
Attached is a screenshot of the connectionpool.py code.

Can not install ggplot for Python on Windows 7, Anaconda 5

I am trying to install ggplot for Python, see below:
All three commands return error messages. The first one is perhaps the most elaborate:
Exception:
Traceback (most recent call last):
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\shutil.py", line 387, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\AKONST~1\\AppData\\Local\\Temp\\pip-y54n7lcl-uninstall\\users\\akonstantinidis\\appdata\\local\\continuum\\anaconda3\\lib\\site-packages\\numpy\\core\\multiarray.cp36-win_amd64.pyd'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\req\req_set.py", line 795, in install
requirement.commit_uninstall()
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\req\req_install.py", line 767, in commit_uninstall
self.uninstalled.commit()
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\req\req_uninstall.py", line 142, in commit
rmtree(self.save_dir)
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
raise attempt.get()
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\six.py", line 686, in reraise
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\utils\__init__.py", line 102, in rmtree
onerror=rmtree_errorhandler)
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\shutil.py", line 494, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
[Previous line repeated 6 more times]
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\shutil.py", line 389, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\akonstantinidis\AppData\Local\Continuum\anaconda3\lib\site-packages\pip\utils\__init__.py", line 114, in rmtree_errorhandler
func(path)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\AKONST~1\\AppData\\Local\\Temp\\pip-y54n7lcl-uninstall\\users\\akonstantinidis\\appdata\\local\\continuum\\anaconda3\\lib\\site-packages\\numpy\\core\\multiarray.cp36-win_amd64.pyd'
I am not sure what these messages imply and how they should be dealt with.
Your advice will be appreciated.
Try running the installation as administrator.Right click the anoconda prompt and select run as administrator and then run the installation.You will need an admin user to do this.

sublime text ubuntu install

I am totally new to ubuntu trying to install sublime text. on running command
sudo add-apt-repository ppa:webupd8team/sublime-text-3
i am getting this error
soumyadeep#soumyadeep-HP-Pavilion-Notebook:~$ sudo add-apt-repository ppa:webupd8team/sublime-text-3
Traceback (most recent call last):
File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3.5/http/client.py", line 1252, in connect
super().connect()
File "/usr/lib/python3.5/http/client.py", line 849, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.5/socket.py", line 711, in create_connection
raise err
File "/usr/lib/python3.5/socket.py", line 702, 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 "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 102, in _get_https_content_py3
lp_page = urllib.request.urlopen(request, cafile=LAUNCHPAD_PPA_CERT)
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1297, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 327, in get_ppa_info
ret = get_ppa_info_from_lp(user, ppa)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 92, in get_ppa_info_from_lp
return get_info_from_lp(lp_url)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 88, in get_info_from_lp
return _get_https_content_py3(lp_url)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 108, in _get_https_content_py3
raise PPAException("Error reading %s: %s" % (lp_url, reason), e)
softwareproperties.ppa.PPAException: 'Error reading https://launchpad.net/api/1.0/~webupd8team/+archive/ubuntu/sublime-text-3: [Errno 111] Connection refused'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 393, in shortcut_handler
return PPAShortcutHandler(shortcut)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 356, in __init__
info = get_ppa_info(self.shortcut)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 339, in get_ppa_info
_get_suggested_ppa_message(user, ppa))
softwareproperties.shortcuts.ShortcutException: Cannot add PPA: 'ppa:~webupd8team/ubuntu/sublime-text-3'.
ERROR: '~webupd8team' user or team does not exist.
Error: 'ppa:webupd8team/sublime-text-3' invalid
please help.
sometime we get trouble while installing sublime on Ubuntu machine.
Note- Uninstalled Sublime completely if you you have installed previously.
Here is steps to get installed on fresh Ubuntu machine-
step 1: open terminal
step 2: wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
step 3: echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
step 4: sudo apt-get update
step 5: sudo apt-get install sublime-text
I installed using these steps, hope will work for you!!!

Resources