Skip to content

Commit 861600b

Browse files
More robust handling of openml_url (#921)
I ran into issues when the openml server config is not exactly 'https://www.openml.org/api/v1/xml', e.g. I had 'https://www.openml.org/api/v1'. I only noticed when getting a bad dataset url. This edit makes the API more robust against how exactly the server URL is set in the config.
1 parent 5a31f8e commit 861600b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openml/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def get_server_base_url() -> str:
101101
=======
102102
str
103103
"""
104-
return server[:-len('/api/v1/xml')]
104+
return server.split("/api")[0]
105105

106106

107107
apikey = _defaults['apikey']

0 commit comments

Comments
 (0)