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

Reading sas file with long string variable results in "A row in the file was not the expected length" #245

Closed
peiyaoli2 opened this issue Jun 17, 2021 · 1 comment

Comments

@peiyaoli2
Copy link

peiyaoli2 commented Jun 17, 2021

Hi! I have attached two files in the zip. One file contains a shortened version of the other file's string variable, and the shortened version does not give an error. The complete error message is:

ReadStat: Row #0 decompressed to -1 bytes (expected 32500 bytes)
ReadStat: Error parsing page 0, bytes 262144-524287
Error processing test_utf8_char_compression.sas7bdat: A row in the file was not the expected length

I guess this is more of a feature request to support longer variables if it's possible. I also feel like this may or may not be a bug relating to #236 (if the long string variable splits maybe that's why it returns READSTAT_ERROR_ROW_WIDTH_MISMATCH?)

Thanks!

string_length_sas.zip

@evanmiller
Copy link
Contributor

Similar to #253, this file has unrecognized control codes 1 and 2 in an RLE-compressed string; these unrecognized codes appear to be the source of the issue. #236 is not related.

I think I have figured out how these codes work, and will have a fix available soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants