flavienbwk
10/09/2020, 8:45 PMclient.create_project() to create a project. But each time I get the following error :
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: <http://xxx.xxx.xxx.xxx:4200/graphq>
My code :
client = Client(api_server="<http://xxx.xxx.xxx.xxx:4200/graphql>")
client.create_project(project_name="weather")
I don't understand what port / URL I should put in Client() .
Thank you for your help.nicholas
docker-compose.yamlflavienbwk
10/09/2020, 8:56 PMlocalhost).nicholas
api_server , pointing it at the :4200/graphql endpoint. Another option is to set this in your local machine's ~/.prefect/config.toml like this:
[server]
endpoint="<http://your_ip:4200/graphql>"nicholas
flavienbwk
10/09/2020, 9:07 PMClient(api_server="<http://192.168.254.1:4200/graphql>")
Getting :
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: <http://192.168.254.1:4200/graphql>
😞nicholas
GET query is missingflavienbwk
10/09/2020, 9:10 PM<http://192.168.254.1:4200/graphql>
in my browser, I get the whole GraphQL interfacenicholas
flavienbwk
10/09/2020, 9:25 PMGET query missing.nicholas
prefect backend server and then re-running your script?flavienbwk
10/09/2020, 9:28 PMprefect.utilities.exceptions.ClientError: [{'message': 'Uniqueness violation.', I guess it worked ! 😄flavienbwk
10/09/2020, 9:28 PMnicholas
nicholas
~/.prefect/config.toml like this:
backend = "server"flavienbwk
10/09/2020, 9:31 PMflavienbwk
10/09/2020, 9:53 PMflow.register(project_name="weather")nicholas
endpoint in ~/.prefect/config.toml as I mentioned above?flavienbwk
10/09/2020, 9:57 PMPREFECT_SERVER_ENDPOINT env variable didn't have effect. Is it the way of doing ? By changing the env variables ? I'll investigate more if it is the case.
What I don't understand is why I'm allowed to specify api_server=my_ip for Client(), but not for Flow()nicholas
flow.register is creating an instance of Client() - I'm not sure the environment variable has an effect in that caseflavienbwk
10/09/2020, 10:08 PMconfig.toml in order for my script to use a custom API endpoint.
Is it intentional ?nicholas
flavienbwk
10/09/2020, 10:12 PM