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

Fail to parse sas7bcat file #38

Closed
jmurray1022 opened this issue Oct 9, 2015 · 6 comments
Closed

Fail to parse sas7bcat file #38

jmurray1022 opened this issue Oct 9, 2015 · 6 comments

Comments

@jmurray1022
Copy link

On loading the SAS files for the 2014 NYTS I get an error about the associated cat file:

"Error: Failed to parse /Users/jared/Dropbox/nyts/nyts2014_formats.sas7bcat: Invalid file, or file has unsupported features."

The data itself appears to load fine, and I have every reason to think the cat file is valid and works in SAS. The files are available at:

http://www.cdc.gov/tobacco/data_statistics/surveys/nyts/

@evanmiller evanmiller changed the title Invalid file error Fail to parse sas7bcat file Oct 9, 2015
@evanmiller
Copy link
Contributor

I am able to reproduce the problem. I'll post back when I have more information about it.

@evanmiller
Copy link
Contributor

This commit should fix the issue: 663554e

You can update your copy of ReadStat with the instructions here:

https://github.com/hadley/haven#updating-readstat

@jmurray1022
Copy link
Author

Thanks! Had a chance to try it out and its early there - everything loads fine, but the labels are off by 1 (they start from 0 but should start from 1).

@evanmiller
Copy link
Contributor

Thanks for the update. I'll look into the 0/1 issue.

@evanmiller
Copy link
Contributor

Think I've found the underlying issue for the off by 1 problem -- this commit should fix it: 450f430

Please try out the latest code and let me know if it works as expected now.

@evanmiller
Copy link
Contributor

Since the parse error is fixed I'm going to close this issue. Let's continue the discussion about the off-by-1 problem over here: #40

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