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

Error when calling files_upload #33

Closed
andscoop opened this issue Jan 18, 2018 · 3 comments
Closed

Error when calling files_upload #33

andscoop opened this issue Jan 18, 2018 · 3 comments

Comments

@andscoop
Copy link

When calling files_upload I receive a 400 error if the fp does not have a '/' in front of the name.
ex.
'test.py'
vs
'/test.py'

Should be an easy fix. Will patch if I find time

@marks
Copy link
Contributor

marks commented Apr 29, 2018

@andscoop this does seem to trip folks up every once in a while. Do you think Domino should return a better error or simply append the preceding / for users?

@macrogers @johnjoo1 interested in your thoughts on this one too.

@peterdcotton
Copy link

peterdcotton commented Oct 13, 2018

I get a 404 error. Do you see anything wrong with this usage...

`def upload_data(local_file,remote_file):
    f = open(local_file, 'rb')
    domino = Domino("peter.cotton/percipience_data",
                api_key='7DunjmBLAHBLAHgzF',
                host='http://app.dominodatalab.com')
    r = domino.files_upload(remote_file, f)
    if r.status_code == 201:
        print(":) Upload successful")
    else:
        print(r.status_code)
        print("!! Upload failed")`

@ddl-olsonJD
Copy link
Collaborator

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

4 participants