ices-tools-prod / icesSAG

R interface to Stock Assessment Graphs database web services
https://sg.ices.dk/webservices.aspx
11 stars 7 forks source link

not able to upload data #255

Open elfunesto opened 3 weeks ago

elfunesto commented 3 weeks ago

Dear all, I am not able to upload my fish stock assessment data, receiving a message Screening file ... Client error: (404) Not Found Erreur dans icesSAG::uploadStock(stock_info, fishdata, verbose = TRUE) : There was a problem with the screening utility. Check input data, and try again. If I run the uploadStock function, it seems to fail at lines 26 27

datsu_resp <- httr::GET(uri) message(httr::http_status(datsu_resp)$message)

with the content of datsu_resp being:

Response [http://datsu.ices.dk/DatsuRest/api/ScreenFile/sg.ices.dk!UserUploads!drouineau_lwiep1oehsh.xml/hilaire.drouineau%40irstea.fr/SAG]
  Date: 2024-10-01 07:15
  Status: 404
  Content-Type: text/html
  Size: 1.25 kB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>404 - File or directory not found.</title>

I have been able to download the xml drouineau_lwiep1oehsh.xml and test it manually on datsu, and it seems to be correction (no errror, correct number of records). Any clues on what is happening? Thank you by advance, Hilaire

elfunesto commented 3 weeks ago

My package version is icesSAG 1.4.1

colinpmillar commented 5 days ago

Hi,

Unfortunately the upload is not working at pressent. I hope to fix this in the next few days.

If you install from github or from r-universe most other things should work as they should...

install.packages("icesSAG", repos = c("https://ices-tools-prod.r-universe.dev", "https://cloud.r-project.org"))

For example:

library(icesSAG) library(dplyr) options(icesSAG.use_token = FALSE) getListStocks(2024) |> filter(Status != "Published")

options(icesSAG.use_token = TRUE) getListStocks(2024) |> filter(Status != "Published")

The only thing missing is the upload capability... I hope to fix that soon! I will be pushing to CRAN soon.

Cheers, Colin