datalorax/slidex

No such file or directory

Closed this issue · 11 comments

Hi,
I've still got the issue mentioned yesterday by someone else

> convert_pptx(path = "/Users/md/Dropbox/Try Slidex",author = "M D") Error in slds[[1]] : subscript out of bounds In addition: Warning messages: 1: In file.rename(file.path(xml_folder, ppt), gsub("\\.pptx", "\\.zip", : cannot rename file 'TrySlidex_xml/Try Slidex' to 'TrySlidex_xml/Try Slidex', reason 'No such file or directory' 2: In unzip(gsub("\\.pptx", "\\.zip", file.path(xml_folder, ppt)), : error 1 in extracting from zip file

Thanks for this amazing package!

Thanks for trying it out @EpiPhys! I think this is actually a slightly different issue and one I was aware of but need to fix. Could you try renaming your presentation so it doesn't have any spaces in it and try again? (you might have to specify force = TRUE this time around, or delete the intermediary files that were left there from the failed attempt - that's another thing I need to clean up)

Well, same message

> convert_pptx(path = "/Users/md/Dropbox/TrySlidex",author = "M D") Error in slds[[1]] : subscript out of bounds In addition: Warning messages: 1: In file.rename(file.path(xml_folder, ppt), gsub("\\.pptx", "\\.zip", : cannot rename file 'TrySlidex_xml/TrySlidex' to 'TrySlidex_xml/TrySlidex', reason 'No such file or directory' 2: In unzip(gsub("\\.pptx", "\\.zip", file.path(xml_folder, ppt)), : error 1 in extracting from zip file

Ah... okay, but it looks like you're missing the extension. Can you try convert_pptx(path = "/Users/md/Dropbox/TrySlidex.pptx", author = "M D")?

Overall, this is probably an issue with not being able to find the file, either before or after parsing. So this also helps in terms of telling me I need to up my error message game. So thank you!

Still...

> convert_pptx(path = "/Users/md/Dropbox/TrySlidex.pptx",author = "M D") Error in slds[[1]] : subscript out of bounds In addition: Warning messages: 1: In file.rename(file.path(xml_folder, ppt), gsub("\\.pptx", "\\.zip", : cannot rename file 'TrySlidex_xml/TrySlidex.pptx' to 'TrySlidex_xml/TrySlidex.zip', reason 'No such file or directory' 2: In unzip(gsub("\\.pptx", "\\.zip", file.path(xml_folder, ppt)), : error 1 in extracting from zip file

Ugh... okay, I officially don't know why this is happening. Can you possibly attach the PPTX in question here? Or you could email it to me if that would be better for you. My email is on my public profile.

TrySlidex.pptx
Actually, I've got this message with every one of my .pptx...

Okay so I was able to get it to run but none of the content came through. A few questions

  1. Are you a mac or windows user?
  2. Is your version of PPTX setup with English as the language encoding? When looking at the XML, I see things like "Titre 1" instead of "Title 1", which would explain why the content is not coming through (essentially the entire XML tree would be different).

EDIT: I'm seeing lang="fr-CH" in all the XML, so that explains why the content is not coming through, but I'm still not sure why you're not ending up with a basically blank RMD, which is what I see.

EDIT 2:

When I run

library(slidex)
convert_pptx("/Users/Daniel/Desktop/TrySlidex.pptx",
             "M D",
             force = TRUE)

I get the attached. If you can get to this level, and it's just an issue of the language encoding, then I'll feel comfortable and for the time being just have it search for the language encoding and note that it can only support English for now - unless I can find an efficient way to convert the encoding before trying to move to RMD.
TrySlidex.Rmd.zip

Okay. Unfortunately I think I'm only going to be able to support English at this point, but maybe down the road I can try to build in support for other languages. That just seems like a big undertaking to start out with (the package is only a little over a week old). You still should be able to get the basically blank RMD though (which is obviously not very helpful). But could you please try the following?

file <- download.file("https://github.com/datalorax/slidex/files/2068868/TrySlidex.pptx",
                      file.path(getwd(), "TrySlidex.pptx"))
library(slidex)
convert_pptx("TrySlidex.pptx", author = "M D", force = TRUE)

If that still doesn't work (in terms of producing the basically blank RMD) I'll be more concerned. Otherwise I think we can safely close this issue.

Great! Sorry the package won't work for you overall. I appreciate your help!