openml / openml-r

R package to interface with OpenML
http://openml.github.io/openml-r/
Other
95 stars 37 forks source link

error downloading my data set 40864 #416

Open joaquinvanschoren opened 6 years ago

joaquinvanschoren commented 6 years ago

From @behrica on May 31, 2018 9:56

I have problems to download my own task 168302 (better said : with its data set: 40864) with the R API. I think I set the apikey correctly, but something strange happens:

getOMLTask(168302)
Downloading from 'http://www.openml.org/api/v1/task/168302' to '/tmp/RtmpAvftWA/cache/tasks/168302/task.xml'.
Downloading from 'https://www.openml.org/api_splits/get/168302/Task_168302_splits.arff' to '/tmp/RtmpAvftWA/cache/tasks/168302/datasplits.arff'
Downloading from 'http://www.openml.org/api/v1/data/40864' to '/tmp/RtmpAvftWA/cache/datasets/40864/description.xml'.
Downloading from 'https://www.openml.org/data/v1/download/7387780/Honey_bee_Seasonal_mortality.arff' to '/tmp/RtmpAvftWA/cache/datasets/40864/dataset.arff'
Error in parseHeader(path) : 
  Invalid column specification line found in ARFF header:
<!doctype html>

Looking at the local dataset file, shows taht iot contains an html error:

<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Forbidden</title>
</head>
  <body>
    <h3>403 Forbidden</h3>
    <p>You don't have the right access rights to view this page. </p>
  </body>
</html>
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Forbidden</title>
</head>
  <body>
    <h3>403 Forbidden</h3>
    <p>You don't have the right access rights to view this page. </p>
  </body>
</html>

It should be all owned by me...

Maybe it is because the visibility is set to "private", but I don't know how to change it:

I tried to delete the data set and all tasks related to it, but don't manage this neither..

Copied from original issue: openml/OpenML#754

joaquinvanschoren commented 6 years ago

This is likely an issue with the R API, I'll move this issue to the R tracker.

Adding your api key to the url seems to work, e.g. try: https://www.openml.org/data/v1/download/7387780/Honey_bee_Seasonal_mortality.arff?api-key=1234567890

so I assume the R API is not passing it correctly.

I can also make the dataset public if you like. If you click on the 'edit' button on the dataset page you can also change it. Note: we are in the middle of redesigning these forms, let me know if it does not work.

behrica commented 6 years ago

Not sure, as it does not work with my API key.

So this

curl https://www.openml.org/data/v1/download/7387780/Honey_bee_Seasonal_mortality.arff?api-key=MY_API_KEY

fails. with "

403 Forbidden

You don't have the right access rights to view this page.

"

behrica commented 6 years ago

Sorry, it does work from command line, I missspelled the api_key parameter.

behrica commented 6 years ago

The problem is in this line: https://github.com/openml/openml-r/blob/0708f97f21dc21925cedd556480cb5d1c52791a0/R/downloadOMLObject.R#L108

in here we download the file with a simple

GET(url), 

which does never adds the apikey, even if set correctly.

joaquinvanschoren commented 6 years ago

Indeed. @giuseppec do you have time to look at this issue?

giuseppec commented 5 years ago

Hm, I am getting the error "403 Forbidden" as well here?