rebalance plugin using lightning-cli rebalancereport: 'plugin has no attribute 'mutex'
I have no idea what it means, I thought I would report it here. Running lightning-cli rebalancereport gives;
{ "code": -32600, "message": "Error while processing rebalancereport: 'Plugin' object has no attribute 'mutex'", "traceback": "Traceback (most recent call last):\n File "/usr/local/lib/python3.10/dist-packages/pyln/client/plugin.py", line 631, in _dispatch_request\n result = self._exec_func(method.func, request)\n File "/usr/local/lib/python3.10/dist-packages/pyln/client/plugin.py", line 613, in _exec_func\n return func(*ba.args, **ba.kwargs)\n File "/data/cln/plugins-available/rebalance/rebalance.py", line 739, in rebalancereport\n res["rebalanceall_is_running"] = plugin.mutex.locked()\nAttributeError: 'Plugin' object has no attribute 'mutex'\n" }
It seems that the init() is not run on startup.
error in startup: plugin-rebalance.py: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
I think this is also fixed with #5574
I can not yet get the fix to work though. When using
cd lightning/contrib/pyln-client poetry install as mentioned here
running pip show pyln-client does not return anything and lightningd does not start. I.e. it is not installed, or installed incorrectly. Not sure how to actually install it.
Supposedly it must be done like #5115. Some more instructions are required. How should requirements.txt be changed and what should be done after that?
Same here after updating to CLN v0.12.0f or
lightning-cli rebalance -k outgoing_scid=xxxx incoming_scid=xxxx
{
"code": -32600,
"message": "Error while processing rebalance: 'Plugin' object has no attribute 'getroute'",
"traceback": "Traceback (most recent call last):\n File \"/home/go/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 639, in _dispatch_request\n result = self._exec_func(method.func, request)\n File \"/home/go/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 619, in _exec_func\n ret = func(*ba.args, **ba.kwargs)\n File \"/mnt/md0/C-Lightning/plugins.bak/rebalance/rebalance.py\", line 212, in rebalance\n getroute = plugin.getroute\nAttributeError: 'Plugin' object has no attribute 'getroute'\n"
Log with rebalance.py plugin dynamic start and subsequent attempted use:
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: Traceback (most recent call last):
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: File \"/home/go/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 639, in _dispatch_request
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: result = self._exec_func(method.func, request)
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: File \"/home/go/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 619, in _exec_func
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: ret = func(*ba.args, **ba.kwargs)
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: File \"/home/go/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 961, in _init
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: return self._exec_func(self.child_init, request)
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: File \"/home/go/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 619, in _exec_func
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: ret = func(*ba.args, **ba.kwargs)
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: File \"/mnt/md0/C-Lightning/plugins.bak/rebalance/rebalance.py\", line 792, in init
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: config = plugin.rpc.listconfigs()
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: File \"/home/go/.local/lib/python3.8/site-packages/pyln/client/lightning.py\", line 911, in listconfigs
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: return self.call(\"listconfigs\", payload)
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: File \"/home/go/.local/lib/python3.8/site-packages/pyln/client/lightning.py\", line 354, in call
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: this_id = self.get_json_id(method, cmdprefix)
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: File \"/home/go/.local/lib/python3.8/site-packages/pyln/client/lightning.py\", line 338, in get_json_id
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: this_id = cmdprefix + '/' + this_id
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py: TypeError: unsupported operand type(s) for +: 'int' and 'str'
2022-10-04T23:59:35.784Z INFO plugin-rebalance.py:
2022-10-05T00:01:04.473Z INFO plugin-rebalance.py: Traceback (most recent call last):
2022-10-05T00:01:04.473Z INFO plugin-rebalance.py: File \"/home/go/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 639, in _dispatch_request
2022-10-05T00:01:04.473Z INFO plugin-rebalance.py: result = self._exec_func(method.func, request)
2022-10-05T00:01:04.473Z INFO plugin-rebalance.py: File \"/home/go/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 619, in _exec_func
2022-10-05T00:01:04.473Z INFO plugin-rebalance.py: ret = func(*ba.args, **ba.kwargs)
2022-10-05T00:01:04.473Z INFO plugin-rebalance.py: File \"/mnt/md0/C-Lightning/plugins.bak/rebalance/rebalance.py\", line 212, in rebalance
2022-10-05T00:01:04.473Z INFO plugin-rebalance.py: getroute = plugin.getroute
2022-10-05T00:01:04.473Z INFO plugin-rebalance.py: AttributeError: 'Plugin' object has no attribute 'getroute'
2022-10-05T00:01:04.473Z INFO plugin-rebalance.py:
I have the same problem with CLN 23.08.1, any suggestions?
I have the same problem with CLN 23.08.1, any suggestions?
I switched to the circular plugin. I didn't try this one again after switching.
https://github.com/giovannizotta/circular