%Protocol.UndefinedError{protocol: Enumerable, value: "5244d2cb-d104-4276-9c3b-1404995a6c1c", descri

[error] ChatProcessor: Fatal error processing conversation: %Protocol.UndefinedError{protocol: Enumerable, value: "5244d2cb-d104-4276-9c3b-1404995a6c1c", description: ""}
[error] ChatProcessor: Stacktrace: (elixir 1.18.4) lib/enum.ex:1: Enumerable.impl_for!/1
(elixir 1.18.4) lib/enum.ex:166: Enumerable.reduce/3
(elixir 1.18.4) lib/enum.ex:4515: Enum.reduce/3
(ash 3.6.2) lib/ash/resource/interface.ex:61: Ash.Resource.Interface.CreateOpts.validate!/1
(thalamus_tasks 0.1.0) deps/ash/lib/ash/code_interface.ex:661: anonymous fn/1 in ThalamusTasks.Analytics.LlmUsage.create/3
(ash 3.6.2) lib/ash/code_interface.ex:281: anonymous fn/2 in Ash.CodeInterface.params_and_opts/3
(thalamus_tasks 0.1.0) deps/ash/lib/ash/code_interface.ex:649: ThalamusTasks.Analytics.LlmUsage.create/3
(thalamus_tasks 0.1.0) lib/thalamus_tasks/workers/chat_processor.ex:210: ThalamusTasks.Workers.ChatProcessor.do_process_conversation/7
(thalamus_tasks 0.1.0) lib/thalamus_tasks/workers/chat_processor.ex:121: ThalamusTasks.Workers.ChatProcessor.process_conversation/7
(oban 2.20.1) lib/oban/queue/executor.ex:145: Oban.Queue.Executor.perform/1
(oban 2.20.1) lib/oban/queue/executor.ex:77: Oban.Queue.Executor.call/1
(elixir 1.18.4) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
(elixir 1.18.4) lib/task/supervised.ex:36: Task.Supervised.reply/4
[error] ChatProcessor: Fatal error processing conversation: %Protocol.UndefinedError{protocol: Enumerable, value: "5244d2cb-d104-4276-9c3b-1404995a6c1c", description: ""}
[error] ChatProcessor: Stacktrace: (elixir 1.18.4) lib/enum.ex:1: Enumerable.impl_for!/1
(elixir 1.18.4) lib/enum.ex:166: Enumerable.reduce/3
(elixir 1.18.4) lib/enum.ex:4515: Enum.reduce/3
(ash 3.6.2) lib/ash/resource/interface.ex:61: Ash.Resource.Interface.CreateOpts.validate!/1
(thalamus_tasks 0.1.0) deps/ash/lib/ash/code_interface.ex:661: anonymous fn/1 in ThalamusTasks.Analytics.LlmUsage.create/3
(ash 3.6.2) lib/ash/code_interface.ex:281: anonymous fn/2 in Ash.CodeInterface.params_and_opts/3
(thalamus_tasks 0.1.0) deps/ash/lib/ash/code_interface.ex:649: ThalamusTasks.Analytics.LlmUsage.create/3
(thalamus_tasks 0.1.0) lib/thalamus_tasks/workers/chat_processor.ex:210: ThalamusTasks.Workers.ChatProcessor.do_process_conversation/7
(thalamus_tasks 0.1.0) lib/thalamus_tasks/workers/chat_processor.ex:121: ThalamusTasks.Workers.ChatProcessor.process_conversation/7
(oban 2.20.1) lib/oban/queue/executor.ex:145: Oban.Queue.Executor.perform/1
(oban 2.20.1) lib/oban/queue/executor.ex:77: Oban.Queue.Executor.call/1
(elixir 1.18.4) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
(elixir 1.18.4) lib/task/supervised.ex:36: Task.Supervised.reply/4
with the following action:
No description
9 Replies
theron
theronOP2mo ago
I can confirm the input is a plaain UUID string I think the change manage_relationship is the issue
theron
theronOP2mo ago
still an issue with:
No description
theron
theronOP2mo ago
Well getting rid of relate_actor , the argument, and just adding it to accept works I'd be grateful to know why though
ZachDaniel
ZachDaniel2mo ago
It's probably expecting the actor to be a map
theron
theronOP2mo ago
smh
ZachDaniel
ZachDaniel2mo ago
lol Oh no wait I think its how you're calling your action its not matching your defined arguments We should fix it to validate this properly i.e "when you pass a non-map into the args map of a code interface, it should raise and tell you what you did wrong" please open an issue for that.
theron
theronOP2mo ago
issue for what what are you saying
ZachDaniel
ZachDaniel2mo ago
Your error is from somewhere where you called a code interface incorrectly You had something like:
define :your_name
define :your_name
and you did something like
YourDomain.your_name("id")
YourDomain.your_name("id")
When you should have done something like
YourDomain.your_name(%{id: "id"})
YourDomain.your_name(%{id: "id"})
because you were missing
define :your_name, args: [:id]
define :your_name, args: [:id]
(or something like that)
theron
theronOP2mo ago
I tried the last one and it didn’t work. Maybe something else is going on If I come across it again I’ll open a ticket

Did you find this page helpful?