Issue with EctoNetwork - (DBConnection.EncodeError) Postgrex expected a binary, got %Postgrex.INET

I have little problem with EctoNetwork:

my schema:

 schema "test" do
    field(:req_ip, EctoNetwork.INET)

my migration:

create table(:test) do
  add(:req_ip, :inet)

It seems ok and it woks when I run the project.
But in the test mode I face with this issue.

** (DBConnection.EncodeError) Postgrex expected a binary, got %Postgrex.INET{address: {127, 0, 0, 1}, netmask: 32}. Please make sure the value you are passing matches the definition in your table or in your query or convert the value accordingly.

Any idea ?

Can you show the code that you’re running that causes this error?


Thanks so much.

I Tried MIX_ENV=test ecto.drop ecto.setup and it goes away.
seems I have issue on my sandbox db.

DB: record: req_ip ->, datatype: inet