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

Closed
armenic opened this issue Jan 15, 2019 · 3 comments

Comments

@armenic
Copy link

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;
run;

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           
status                                     
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  
@thays42

This comment has been minimized.

Copy link
Contributor

commented Jan 19, 2019

I'll tackle for dev day.

@hadley

This comment has been minimized.

Copy link
Member

commented Jan 23, 2019

Thanks @thays42!

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

@lock

This comment has been minimized.

Copy link

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. https://reprex.tidyverse.org/

@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.
Projects
None yet
4 participants
You can’t perform that action at this time.