--- Log opened Wed Apr 08 00:00:46 2020 00:17 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 260 seconds] 00:41 -!- vasild_ [~vd@gateway/tor-sasl/vasild] has joined #c-lightning 00:44 -!- vasild [~vd@gateway/tor-sasl/vasild] has quit [Ping timeout: 240 seconds] 00:44 -!- vasild_ is now known as vasild 00:50 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Quit: Leaving.] 01:37 -!- kristapsk [~KK@gateway/tor-sasl/kristapsk] has quit [Ping timeout: 240 seconds] 02:04 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 02:05 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 02:55 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #c-lightning 04:08 -!- kristapsk [~KK@gateway/tor-sasl/kristapsk] has joined #c-lightning 04:09 -!- Teoti [teoti@gateway/vpn/privateinternetaccess/teoti] has quit [Ping timeout: 256 seconds] 04:23 -!- Teoti [~teoti@modemcable238.180-226-192.mc.videotron.ca] has joined #c-lightning 04:26 -!- kristapsk [~KK@gateway/tor-sasl/kristapsk] has quit [Ping timeout: 240 seconds] 05:24 -!- dr-orlovsky [~dr-orlovs@xdsl-188-155-161-135.adslplus.ch] has joined #c-lightning 05:47 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 06:05 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Quit: Leaving.] 06:06 -!- ghost43_ [~daer@gateway/tor-sasl/daer] has joined #c-lightning 06:07 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Ping timeout: 240 seconds] 06:13 -!- ghost43_ [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 06:15 -!- belcher [~belcher@unaffiliated/belcher] has joined #c-lightning 06:15 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #c-lightning 06:23 -!- dr-orlovsky [~dr-orlovs@xdsl-188-155-161-135.adslplus.ch] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 06:35 -!- kristapsk [~KK@gateway/tor-sasl/kristapsk] has joined #c-lightning 07:03 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 07:05 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #c-lightning 07:20 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 07:21 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #c-lightning 07:34 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 07:34 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 08:07 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 08:08 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #c-lightning 08:26 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 08:26 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #c-lightning 08:43 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 265 seconds] 09:01 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 09:31 < sr_gi> Hey guys, is there anyway to capture the error for missing required arguments within the c-lightning plugin framework for Python? (cc/ cdecker) 09:32 < sr_gi> I've seen that if a required argument is missing the daemon will print a TypeError letting you know, but I wanted to catch it so it could be properly formatted 09:33 < sr_gi> The only workaround I've found is working with *args and parsing them myself, without forcing required arguments 09:36 < darosior> sr_gi: Can't you just try: [...] except: ? 09:37 < darosior> If you want to catch a rpc error, you can import and except for RpcError (or somethin like that) which you can import from pyln-client 09:41 < sr_gi> It's pyln who's raising on parsing the rpc command since the argument is missing, so I'm not sure I can capture the exception from the plugin 09:44 < darosior> Could you post a snippet on 0bin.net ? 09:44 < sr_gi> Sure 09:50 < sr_gi> https://0bin.net/paste/jmqDYdjeUhWqZz7D#jFaZRGIRso3X9zXpKUmRYzmBQCMJLYTfWRzJmJOGQ69 09:51 < sr_gi> I can send you a proper snippet if necessary, but I think you'll get the idea from there 09:53 < darosior> Yep I get the idea 09:54 < darosior> You'd like to have lightningd return a proper JSONRPC error so that you can catch it ? 09:54 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:24e5:9ce9:b92f:4c1b] has joined #c-lightning 09:55 < darosior> But unfortunately we don't send any JSONRPC command to lightningd if the argument list of the function is not respected in the first place.. So yeah using **kwargs (or *args as you said) seems the best workaround 09:55 < sr_gi> Well, at least display it properly so it follows the same UI as with normal built-in RPC calls 09:56 < darosior> AH no I'm wrong 09:58 < sr_gi> For me it'd make sense if the call returned a code -32602 with a message saying the exact same, but abstracting the's been an exception 09:58 < sr_gi> Even the fact that the exception is on the logs seems weird 10:02 < sr_gi> I can always PR pyln to include that as long as having that kind of return for missing params makes sense 10:07 < darosior> It definitely makes sense, I'm currently trying to find out why it's not the current behaviour ^^ 10:17 -!- kristapsk [~KK@gateway/tor-sasl/kristapsk] has quit [Remote host closed the connection] 10:17 -!- kristapsk [~KK@gateway/tor-sasl/kristapsk] has joined #c-lightning 11:35 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:24e5:9ce9:b92f:4c1b] has quit [Quit: Sleep mode] 11:51 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:24e5:9ce9:b92f:4c1b] has joined #c-lightning 12:01 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:24e5:9ce9:b92f:4c1b] has quit [Quit: Sleep mode] 12:05 < sr_gi> Great, let me know if I can be of any help 12:13 < darosior> Yep sorry I did not report, I gave it a quick look but I don't have the time to dive in it currently. 12:17 < darosior> Thing is we raise _bind_pos() called by _exec_func() ( https://github.com/ElementsProject/lightning/blob/b51772ff68c237627f526be579f0b99c90082183/contrib/pyln-client/pyln/client/plugin.py#L419), but I would have expected it to be catched since the requests (for commands) are dispatched here 12:17 < darosior> https://github.com/ElementsProject/lightning/blob/b51772ff68c237627f526be579f0b99c90082183/contrib/pyln-client/pyln/client/plugin.py#L427 and we try: .... except: the call to _exec_func() 12:33 -!- belcher [~belcher@unaffiliated/belcher] has quit [Ping timeout: 258 seconds] 12:38 -!- belcher [~belcher@unaffiliated/belcher] has joined #c-lightning 12:41 -!- vasild_ [~vd@gateway/tor-sasl/vasild] has joined #c-lightning 12:44 -!- vasild [~vd@gateway/tor-sasl/vasild] has quit [Ping timeout: 240 seconds] 12:44 -!- vasild_ is now known as vasild 13:14 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 13:15 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 15:50 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 15:50 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 16:14 -!- zmnscpxj [~zmnscpxj@gateway/tor-sasl/zmnscpxj] has joined #c-lightning 16:14 -!- willcl_ark [~quassel@cpc123762-trow7-2-0-cust7.18-1.cable.virginm.net] has quit [Ping timeout: 272 seconds] 16:17 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 260 seconds] 16:19 -!- willcl_ark [~quassel@cpc123762-trow7-2-0-cust7.18-1.cable.virginm.net] has joined #c-lightning 16:22 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #c-lightning 16:30 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 16:37 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Quit: Leaving.] 16:45 -!- ctrlbreak_MAD [~ctrlbreak@159.2.182.106] has joined #c-lightning 16:49 -!- ctrlbreak [~ctrlbreak@159.2.182.106] has quit [Ping timeout: 268 seconds] 17:31 -!- belcher [~belcher@unaffiliated/belcher] has quit [Quit: Leaving] 17:41 -!- vincenzopalazzo [~vincent@89.34.99.79] has joined #c-lightning 18:30 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #c-lightning 18:52 -!- vincenzopalazzo [~vincent@89.34.99.79] has quit [Ping timeout: 256 seconds] 19:24 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 19:24 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 20:10 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 20:10 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 22:42 -!- zmnscpxj [~zmnscpxj@gateway/tor-sasl/zmnscpxj] has quit [Ping timeout: 240 seconds] 23:40 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 23:43 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 240 seconds] --- Log closed Thu Apr 09 00:00:48 2020