[Rspamd-Users] fuzzy learn condition failed

G.W. Haywood rspamd at jubileegroup.co.uk
Sun Aug 18 17:08:22 UTC 2024


Hi there,

On Sun, 18 Aug 2024, christian via Users wrote:

> Hello, I get the error message:
>
> 2024-08-18 17:06:02 #2206254(controller) <7fdc00>; task; 
> fuzzy_process_handler: call to fuzzy learn condition failed: [string "return 
> function(task)..."]:3: attempt to compare number with table; trace: 
> [1]:{[string "return function(task)..."]:3 - <unknown> [Lua]};
> ...
> What am I doing wrong?

The error message tells you that at line 3 you're trying to compare a
number with something which is not a number.  You can't do that.

> Can you please give me a tip.
> ...
> ...
> return function(task)
>  local score = task:get_metric_score('default')
>  if score >= 10 then
> ...

The documentation here

https://www.rspamd.com/doc/lua/rspamd_task.html#m5519f

says get_metric_score returns two values as a kind of table.

-- 

73,
Ged.


More information about the Users mailing list