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

File upload borked #34

Open
rossjones opened this issue Jan 7, 2014 · 4 comments
Open

File upload borked #34

rossjones opened this issue Jan 7, 2014 · 4 comments

Comments

@rossjones
Copy link

It looks like, at least with datahub.io, file upload has not worked since 183ad05 - using this revision is fine.

Any commit since then makes google return an error about posting to create a bucket not being allowed.

@davidread
Copy link
Contributor

Agreed. Here's the test case:

>>> import ckanclient
>>> ckan = ckanclient.CkanClient(base_location='http://datahub.io/api', api_key='<key>')
>>> ckan.upload_file('/vagrant/test.csv')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/vagrant/ckanclient/ckanclient/__init__.py", line 582, in upload_file
    raise CkanApiError(body)
ckanclient.CkanApiError: <?xml version='1.0' encoding='UTF-8'?><Error><Code>InvalidArgument</Code><Message>Invalid argument.</Message><Details>Cannot create buckets using a POST.</Details></Error>

However, @Hoedic says it works for him with local storage. It would be great if he could look try and get his code working with the Google storage that datahub.io uses.

@Hoedic
Copy link
Contributor

Hoedic commented Jan 9, 2014

Why is this closed?

I have to say I have zero knowledge with Google Storage and I don't see anything specific in the CkanClient concerning the google storage, so I guess CKAN manages the Google storage part. So somewhere, the new version of the client makes that CKAN screws the upload to Google storage...

@davidread, would you be able to get a dump of the multipart data with the commit that works?

@rufuspollock
Copy link
Member

@Hoedic not sure what's closed here? #31 is closed thanks to your efforts :-)

Re file upload ckanclient does handle the google storage stuff in fact, but as I said that was already broken in pycurl refactor and we can fix that for you :-)

@Hoedic
Copy link
Contributor

Hoedic commented Jan 10, 2014

Oh yes, it was #31! Sorry, I saw "closed" in red, I thought it was for the current issue. My bad

Thank you @rgrp for taking of the google storage, I was a bit discouraged :p

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