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

FIX: Fix encoding to allow StataReader to read urls #9245

Merged
merged 1 commit into from
Jan 16, 2015

Conversation

bashtage
Copy link
Contributor

Fix encoding so that StataReader can correctly read URLs

closes #9231

@bashtage
Copy link
Contributor Author

This fix is not finished - mostly using it to document the issue. The StringIO is returning unicode while unpack expects bytes (or string on Python 2). This simply encodes the unicode to a new StringIO object, and is very ugly.

@bashtage bashtage force-pushed the stata-url branch 2 times, most recently from 1ba5898 to bcef1e9 Compare January 14, 2015 15:13
@bashtage
Copy link
Contributor Author

@jreback @jseabold Should be fixed now. I left in the url read for now simply to to verify once that it works. I will delete this basic test once it goes green.

@bashtage bashtage force-pushed the stata-url branch 3 times, most recently from 7056f0a to b1f0fb7 Compare January 14, 2015 16:24
@bashtage
Copy link
Contributor Author

One timed out, the others all passed, so it seems ready, barring other issues in the method I used.

@@ -105,7 +105,7 @@ Bug Fixes
- Bug in left ``join`` on multi-index with ``sort=True`` or null values (:issue:`9210`).



- Fixed character encoding bug in `read_stata` and `StataReader` when loading data from a URL (:issue:`9231`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make these double back ticks on both sides of the word

@jreback
Copy link
Contributor

jreback commented Jan 15, 2015

minor comment, I restarted the stalled job

@jreback jreback added IO Stata read_stata, to_stata Unicode Unicode strings labels Jan 15, 2015
@jreback jreback added this to the 0.16.0 milestone Jan 15, 2015
@bashtage
Copy link
Contributor Author

@jreback Looks good. Let me know if you need me to rebase.

Fix encoding so that StataReader can correctly read URLs

closes pandas-dev#9231
jreback added a commit that referenced this pull request Jan 16, 2015
FIX: Fix encoding to allow StataReader to read urls
@jreback jreback merged commit dcbd007 into pandas-dev:master Jan 16, 2015
@jreback
Copy link
Contributor

jreback commented Jan 16, 2015

@bashtage thanks!

@bashtage bashtage deleted the stata-url branch January 18, 2015 22:42
akx added a commit to akx/pandas that referenced this pull request Oct 3, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 3, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 3, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 5, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 5, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 6, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 6, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 7, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 10, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 11, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 11, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 11, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 11, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 11, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 14, 2022
akx added a commit to akx/pandas that referenced this pull request Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Stata read_stata, to_stata Unicode Unicode strings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

read_stata failing with URL
2 participants