OpenEOClient$connect ignores host set by OpenEOClient$new
benjaminschwetz opened this issue · comments
Hi,
I just noticed that the connect
method returns an error when I set the url via new
. I tested with openeo 1.1.0
library(openeo)
#>
#> Attaching package: 'openeo'
#> The following objects are masked from 'package:base':
#>
#> capabilities, debug
x = OpenEOClient$new(host = "example.foo")
x$connect()
#> Note: Host-URL is missing
Created on 2021-12-01 by the reprex package (v2.0.1)
Thanks for spotting this. The parameter url
in $connect()
was mandatory and did not take into account that it could have been set upon initialization. So, now you will receive a message, that the url example.foo cannot be resolved, what it is kind of to be expected.
Doesn't work for me yet, I'm getting:
> library(openeo)
> x = OpenEOClient$new(host = "https://openeo.cloud")
> x$getHost()
[1] "https://openeo.cloud"
> x$connect()
Argument "url" fehlt (ohne Standardwert)
I'm on R 4.0.2
Weird, after updating to the latest commit I get:
> library(openeo)
> x = OpenEOClient$new(host = "https://openeo.cloud")
> x$getHost()
[1] "https://openeo.cloud"
> x$connect()
host must be a single element of type 'character'
Fix for the issue above in PR #100