#good question, I think it should all
1 messages · Page 1 of 1 (latest)
howdoicomputer@framework:~/workspace/dagger-python-consume]$ dagger call hello-world
✘ load call ERROR [8.89s]
├ [8.89s] loading module
┃ Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module
┃ hema: schema validation failed: input:2045: Undefined type ConsumeAnyID.
┃
┃ | ...
┃ 2042 | Marker object for Signature.empty and Parameter.empty.
┃ 2043 |
┃ 2044 | """
┃ 2045 | self: ConsumeAnyID!
┃ 2046 | ): String!
┃ 2047 | }
┃ 2048 | extend type Query {
┃ | ...
✘ serve ERROR [5.70s]
• Engine: e092887d0aee (version v0.9.3)
⧗ 9.83s ✔ 80 ∅ 24 ✘ 2
Not sure if I'm doing it right though.
Is this a python or go module?
I'm consuming your HelloWorld Go module using Python.
import dagger
from dagger.mod import function
@function
def HelloWorld(self) -> str:
dagger.HelloWorld.message()
Trying to make things as simple as possible.
dagger.HelloWorld() ?
I'm ashamed to say, I haven't used the new Zenith Python SDK at all yet.
It's the middle of the night for Helder, but maybe @cedar pewter is still around, I know he has used it
Without seeing too much of the code, I think what you want is dagger.hello_world().message()
Hm, with:
import dagger
from dagger.mod import function
@function
def say(self) -> str:
dagger.hello_world().message()
dagger call say
I get the same error message. Sorry, was super happy with the capitlization because I was just writing Go lol
Oh wait dagger mod sync
Ah, that didnt work
yeah looking at the error I'm not sure where it's tripping but I think it's before either of those two things
Is your go module public?
dagger mod use github.com/shykes/daggerverse/helloWorld@26f8ed9f1748ec8c9345281add850fd392441990
{
"name": "consume",
"sdk": "python",
"dependencies": [
"github.com/shykes/daggerverse/helloWorld@26f8ed9f1748ec8c9345281add850fd392441990"
]
}
This is what my code currently looks like:
import dagger
from dagger.mod import function
@function
def say() -> str:
dagger.hello_world().message()
@function
def test() -> str:
return "hello"
dagger call test returns an expected value. dagger call say returns ┃ Error: response from query: input:1: consume.say Cannot return null for non-nullable field Consume.say.
Got it working!
import dagger
from dagger.mod import function
@function
def say() -> str:
return dagger.hello_world().message()
@function
def test() -> str:
return "hello"
And dagger mod sync works
hah just caught up 🙂 yeah the return
That's super sick.
Thank you @cedar pewter !
Yeah, thank you!
my pleasure 🙂 we definitely need to improve error messages
I think it made enough sense. I mean, it should be better but I did read it and think "I probably need an explicit return"
A general tutorial on consuming a module from another language would be very helpful
Yeah I was meaning this part host.directory.asModule.serve failed to install module ┃ hema: schema validation failed: input:2045: Undefined type ConsumeAnyID. 🙃