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

read_sas, Unable to allocate memory, when dataset has no variables #420

ghost opened this issue Jan 15, 2019 · 3 comments

read_sas, Unable to allocate memory, when dataset has no variables #420

ghost opened this issue Jan 15, 2019 · 3 comments


Copy link

@ghost ghost commented Jan 15, 2019

Dear developer,

It seems that a read_sas() fails whenever a SAS dataset has no variables. This happens with haven 1.1.2 and higher. Probably it would be better to inform user that dataset does not have variables rather than failing. For example, If you have a dataset created with the following code:

libname out '~';

data out.some_data;

and then you read with haven::read_sas('~/some_data.sas7bdat') it gives the following error:

ReadStat: Error parsing page 0, bytes 74752-149503
Error in df_parse_sas_file(spec_data, spec_cat, encoding = encoding, catalog_encoding = catalog_encoding,  : 
  Failed to parse /opt/bee/home_NEW/manukyae/some_data.sas7bdat: Unable to allocate memory.
> R.version
platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
major          3                           
minor          5.1                         
year           2018                        
month          07                          
day            02                          
svn rev        74947                       
language       R                           
version.string R version 3.5.1 (2018-07-02)
nickname       Feather Spray  
Copy link

@thays42 thays42 commented Jan 19, 2019

I'll tackle for dev day.

Copy link

@hadley hadley commented Jan 23, 2019

Thanks @thays42!

@hadley hadley closed this in 81f8f52 Jan 23, 2019
Copy link

@lock lock bot commented Jul 22, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue.

@lock lock bot locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants