TwistingTwists

TwistingTwists

Poolboy example error: (Mix) Could not start application poolboy_py_elixir

(Mix) Could not start application poolboy_py_elixir: PoolboyPyElixir.Application.start(:normal, []) returned an error: shutdown: failed to start child: :square_worker
    ** (EXIT) an exception was raised:
        ** (MatchError) no match of right hand side value:
{:error, {:EXIT, {:undef, [{PoolboyPyElixir.SquareWorker, :start_link, [[]], []}, {:supervisor, :do_start_child_i, 3, [file: 'supervisor.erl', line: 414]}, {:supervisor, :handle_call, 3, [file: 'supervisor.erl', line: 439]}, 
{:gen_server, :try_handle_call, 4, [file: 'gen_server.erl', line: 721]}, 
{:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 750]}, 
{:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]}}}

The sample repo’s application.ex is here.

I am trying to follow this post.

This is first time trying to understand poolboy. Any help is appreciated.

Marked As Solved

krstfk

krstfk

It’s probably because the start_link in your SquareWorker module expect 0 argument while the supervisor starting the process expects 1 argument.

Also Liked

krstfk

krstfk

Well, it’s not really obvious, but when you see that after the error:

You see that something is undefined, and if you know about the mfa notation (module, function, arguments), namely PoolboyPyElixir.SquareWorker is the module, :start_link is the function, and [[]] are the arguments (one arg of empty list), it starts to make sense. Especially if you keep in my that in Erlang/Elixir, the arity of a function is part of its signature.

TwistingTwists

TwistingTwists

thanks for insight on reading the error message. Kudos for the acronym mfa.

This helps me become 1% better debugger.

Where Next?

Popular in Questions Top

_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
New
Kagamiiiii
Student & New to elixir. Nice language. I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1140 51847 244
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

We're in Beta

About us Mission Statement