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

Can not download a uploaded and converted CSV file #122

Closed
powtac opened this issue Dec 4, 2014 · 1 comment
Closed

Can not download a uploaded and converted CSV file #122

powtac opened this issue Dec 4, 2014 · 1 comment

Comments

@powtac
Copy link

powtac commented Dec 4, 2014

See netbe/Babelish#46

Use Case

First uploaded https://raw.githubusercontent.com/netbe/Babelish/master/test/data/test_data_with_percent_space.csv to Google Drive (I have auto convert off).

1

Then I opened it with Google Spreadsheets, the file was duplicated and auto converted to Google Spreadsheet. After that I deleted the original .csv file.

2

Then I ran babelish csv2strings --filename="test_data_with_percent_space.csv" --fetch --verbose --ignore-lang-path --sheet=0 --langs=English:"en" babelish returns a HTTP 400 error from Google. See details here: netbe/Babelish#46 (comment)

But when I create a new blank Spreadsheet file and I manually add "English/GREETINGS" everything works fine and downloads the contents. So there is no obvious problem with the auth token.

@gimite
Copy link
Owner

gimite commented Dec 12, 2014

I'm not exactly sure what went wrong. But there was some issue with CSV export in google_drive 0.3.x. It may be solved by using google_drive 1.0.0 instead, though it's still pre version. You can install it by:

$ sudo gem install --pre google_drive

You need to write:

spreadsheet.worksheets[0].export_as_string

to export it as CSV. Note that google_drive 1.0.0 is not 100% compatible with 0.3.x, and you may need to modify other part of your code too.

@gimite gimite closed this as completed May 6, 2016
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