You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try quite simple queries with atlas_media, they often fail. For example, to get images for this record, I get:
atlas_media(
filter = galah_filter(id == "ead2f896-4c07-4e5e-9dc4-be5c9ee7643f"),
download_dir = "cache")
|========================================================================| 100%
Calling the API failed for `atlas_media`.
ℹ This might mean that the ALA system is down. Double check that your query is correct.
ℹ If you continue to see this message, please email support@ala.org.au.
# A tibble: 0 × 0
On further investigation, it appears there are (at least) two problems:
This function uses the imageInfoForList API (docs here) to query many image identifiers at once, but doesn't appear to work
It also uses curl::Async to make the query, but this errors for unknown reasons (Error in AsyncVaried$new(.list = reqs) : object 'reqs' not found)
Both problems can be solved by choosing simpler solutions and looping/lapply-ing across all identifiers. This approach has the advantage that the API supports downloading thumbnails by adding thumbnail to the url, perhaps via a type argument.
The text was updated successfully, but these errors were encountered:
- switch to simpler API call for images
- switch from `Async` to `HttpClient` for downloads
- add `type` argument to support thumbnail downloads
- remove `select` argument (not used)
- misc updates to ensure the above actually works
`atlas_media` now returns a `tibble`, but does not download images; this allows use of e.g. `dplyr::filter` to reduce the number of images that will be returned (#140, #151)
- new function `collect_media` takes a tibble from `atlas_media` and downloads to the specified directory. Supports thumbnail downloads via `type` argument (#145)
- Alternatively, users can build their own media queries via `atlas_occurrences` and trigger a metadata download (equivalent to `atlas_media`) using `show_all_media`
When I try quite simple queries with
atlas_media
, they often fail. For example, to get images for this record, I get:On further investigation, it appears there are (at least) two problems:
imageInfoForList
API (docs here) to query many image identifiers at once, but doesn't appear to workcurl::Async
to make the query, but this errors for unknown reasons (Error in AsyncVaried$new(.list = reqs) : object 'reqs' not found
)Both problems can be solved by choosing simpler solutions and looping/
lapply
-ing across all identifiers. This approach has the advantage that the API supports downloading thumbnails by addingthumbnail
to the url, perhaps via atype
argument.The text was updated successfully, but these errors were encountered: