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

Algorithmia.errors.DataApiError: unable to get file ... from Hosted Data #20

Closed
dattran2346 opened this issue May 22, 2019 · 2 comments
Closed
Assignees

Comments

@dattran2346
Copy link

Hi, I have a problem of accessing file in my Hosted Data. Here is the code snippet

import Algorithmia

client = Algorithmia.client('sim0b1n3***pxFqn1')
cred_json = client.file("data://.my/models/cred.json").getJson()

This works fine when running on my local machine, I use conda env, python3.5.4 as #14. However, when I run this in Algorithmia IDE, I can't access the same file
Algorithmia.errors.DataApiError: unable to get file .my/models/cred.json - None

My Algorithm setup is python3, closed source, allow internet access. I use the default api key. The read access of .my/models/ is public

@besirkurtulmus besirkurtulmus self-assigned this May 22, 2019
@besirkurtulmus
Copy link
Contributor

Hi @dattran2346,

I've been able to reproduce your error. It looks like a bug.

The good news is that inside the Algorithmia IDE (aka. inside the algorithm), you don't need to provide an API key. It automatically authenticates. Removing the API key should work in your use-case.

I'll go ahead, and label this issue as a bug in the meantime.

@jamesatha
Copy link
Contributor

jamesatha commented Jun 3, 2019

@dattran2346 when you run this inside the Algoirthmia platform, you should not supply an API key. So the line to create the client should look like this:

client = Algorithmia.client()

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

3 participants