Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong 'href' for collection when not using standard ports on dataverse server #46

Open
chStaiger opened this issue Apr 15, 2018 · 3 comments

Comments

@chStaiger
Copy link

I am using an own testing instance of dataverse with 8080 as HTTP port.
Connecting and creation and listing of dataverses works fine.

host = 'my.server.com:8080'
connection = Connection(host, token, use_https=False)
dataverse = connection.get_dataverse('myverse')

However, when creating a new dataset or listing existing datasets I receive the following error:

datasets = dataverse.get_datasets()

InvalidURL: Failed to parse: 145.100.59.118:8080:8080

For some reason the field:

dataverse.collection.get('href')
'https://my.server.com:8080:8080/dvn/api/data-deposit/v1.1/swordv2/collection/dataverse/userverse'

is not set correctly.

Is it possible to make the port another argument in the class Connection?

@pdurbin
Copy link
Member

pdurbin commented Apr 15, 2018

@chStaiger hi! The easiest solution for you is probably to use the instance of https://demo.dataverse.org which you are very welcome to do.

The bug you found is on the Dataverse server side. I left a todo in the code to not always return https: https://github.com/IQSS/dataverse/blob/v4.8.6/src/main/java/edu/harvard/iq/dataverse/api/datadeposit/UrlManager.java#L185

If you feel like opening a issue at https://github.com/IQSS/dataverse/issues I would appreciate it!

@chStaiger
Copy link
Author

Server issue reported: IQSS/dataverse#4586

@pdurbin
Copy link
Member

pdurbin commented Apr 15, 2018

@chStaiger thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants