$ mycli -D test_1
(2003, "Can't connect to MySQL server on 'localhost' ([Errno 61] Connection refused)")
The second alias crashes:
$ mycli -D test_2
Traceback (most recent call last):
File "/opt/homebrew/bin/mycli", line 8, in <module>
sys.exit(cli())
^^^^^
File "/opt/homebrew/opt/python-click/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/opt/python-click/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/opt/python-click/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/opt/python-click/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/mycli/1.27.0/libexec/lib/python3.12/site-packages/mycli/main.py", line 1278, in cli
uri = urlparse(dsn_uri)
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.2/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/parse.py", line 394, in urlparse
url, scheme, _coerce_result = _coerce_args(url, scheme)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.2/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/parse.py", line 133, in _coerce_args
return _decode_args(args) + (_encode_result,)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.2/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/parse.py", line 117, in _decode_args
return tuple(x.decode(encoding, errors) if x else '' for x in args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.2/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/parse.py", line 117, in <genexpr>
return tuple(x.decode(encoding, errors) if x else '' for x in args)
^^^^^^^^
AttributeError: 'list' object has no attribute 'decode'
My
~/.myclirc
has this:The first alias works:
The second alias crashes: