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

[Bug]: Read Zip Issue #159

Open
1 task done
wincowgerDEV opened this issue Dec 21, 2023 · 4 comments
Open
1 task done

[Bug]: Read Zip Issue #159

wincowgerDEV opened this issue Dec 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@wincowgerDEV
Copy link
Owner

Guidelines

  • I agree to follow this project's Contributing Guidelines.

Project Version

No response

Platform and OS Version

No response

Existing Issues

No response

What happened?

We would expect this zip folder of spc files to read correctly but it returns an error.

10.37.zip

Steps to reproduce

library(OpenSpecy)
file <- "10.37.zip"
check <- read_any(file)

Error in do.call(paste0("read_", tolower(ex)), list(file = file, ...)) :
'what' must be a function or character string

Also if we try to read the files as spc by themselves with read_spc

read_spc("10.8.D.spc")

Error in gsub(rawToChar(replace.nul), "\r\n", log.txt) :
'pattern' is invalid

Somehow the files can be read into OpenSpecy.org though, really a head scratcher.

image

Expected behavior

Read the spc files and/or zip

Attachments

No response

Screenshots or Videos

No response

Additional Information

No response

@wincowgerDEV wincowgerDEV added the bug Something isn't working label Dec 21, 2023
@wincowgerDEV
Copy link
Owner Author

A bit more recon on this, the error line seems to be here in read_zip:

lst <- lapply(file.path(tmp, flst$Name), read_any, ...)

@wincowgerDEV
Copy link
Owner Author

When it sends back to read_any we can find this line causing the issue os <- do.call(paste0("read_", tolower(ex)), list(file = file, ...))

@wincowgerDEV
Copy link
Owner Author

Broke through the first error with 3133956 by updating how we extract the extension name.

@wincowgerDEV
Copy link
Owner Author

The second error with read.spc is still there. I think it has something to do with file naming but not positive, I tested changing the file name but that didn't work. Will file issue with hyperSpec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant