Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Elixir,postgresql错误:具有无效的连接类型_Postgresql_Elixir_Ecto_Semaphore Ci_Postgrex - Fatal编程技术网

Elixir,postgresql错误:具有无效的连接类型

Elixir,postgresql错误:具有无效的连接类型,postgresql,elixir,ecto,semaphore-ci,postgrex,Postgresql,Elixir,Ecto,Semaphore Ci,Postgrex,我得到了以下问题: ArgumentError{message: \"query %Postgrex.Query{columns: ["id", "name", "internal", "inserted_at", "updated_at"], name: "ecto_616034", param_formats: [:binary], param_oids: [25], param_types: [Postgrex.Extensions.Raw], ref: #Reference<0.0

我得到了以下问题:

ArgumentError{message: \"query %Postgrex.Query{columns: ["id", "name", "internal", "inserted_at", "updated_at"], name: "ecto_616034", param_formats: [:binary], param_oids: [25], param_types: [Postgrex.Extensions.Raw], ref: #Reference<0.0.1.107309>, result_formats: [:binary, :binary, :binary, :binary, :binary], result_oids: [23, 1043, 16, 1184, 1184], result_types: [Postgrex.Extensions.Int4, Postgrex.Extensions.Raw, Postgrex.Extensions.Bool, Ecto.Adapters.Postgres.TimestampTZ, Ecto.Adapters.Postgres.TimestampTZ], statement: "SELECT r0.\"id\", r0.\"name\", r0.\"internal\", r0.\"inserted_at\", r0.\"updated_at\" FROM \"roles\" AS r0 WHERE (r0.\"name\" = $1)", types: {Ecto.Adapters.Postgres.TypeModule, 35356751}} has invalid types for the connection\"}", status: "error"}
测试在我的本地机器上运行正常,但每次都在semaphoreci上进行。我正在使用docker compose处理“postgis”图像,我已经尝试过处理“postgres”图像,结果相同

非常感谢您的任何建议


谢谢

我在伞式应用程序中遇到过这种情况,其中一个项目的seeds.exs文件错误地调用了伞式应用程序中另一个应用程序的Repo模块

所以

cat-app1/priv/repo/seeds.exs

### Using The right Repo module ###
App1.Stuffs.query_stuff()
|> App1.Repo.one() # <== Should look like this -- Use App1.Repo module

### Using the wrong Repo module ###
App1.ThingStuffs.query_things() 
|> App2.Repo.one() # <== this was causing this error for me
使用正确的回购模块### App1.Stuffs.query_stuff()文件
|>App1.Repo.one()#App2.Repo.one()#您在信号量ci和开发机器上使用了哪些版本的
postgres
?我尝试的图像:mdillon/postgis:9.1 postgres/9.6在本地机器上我正在使用postgres.app和postgres(PostgreSQL)9.6.1。满满的
### Using The right Repo module ###
App1.Stuffs.query_stuff()
|> App1.Repo.one() # <== Should look like this -- Use App1.Repo module

### Using the wrong Repo module ###
App1.ThingStuffs.query_things() 
|> App2.Repo.one() # <== this was causing this error for me