datalorax / slidex

Convert PowerPoint Slides to xaringan (remark.js) Slides
Other
290 stars 39 forks source link

No such file or directory #2

Closed EpiPhys closed 6 years ago

EpiPhys commented 6 years ago

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!

datalorax commented 6 years ago

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)

EpiPhys commented 6 years ago

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

datalorax commented 6 years ago

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!

EpiPhys commented 6 years ago

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

datalorax commented 6 years ago

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.

EpiPhys commented 6 years ago

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

datalorax commented 6 years ago

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

EpiPhys commented 6 years ago

I'm a Mac user and run Windows with VB As I'm french, I guess my PPTX has french as language encoding...

Maïa

Le lun. 4 juin 2018 à 17:32, Daniel Anderson notifications@github.com a écrit :

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).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datalorax/slidex/issues/2#issuecomment-394398231, or mute the thread https://github.com/notifications/unsubscribe-auth/AmDT9UaiEAu2lvlVFCChOR-vZzq6Zp7Fks5t5VMpgaJpZM4UYluu .

datalorax commented 6 years ago

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.

EpiPhys commented 6 years ago

That works.

Thanks for your reactivity and your efforts! Your work is terrific.

Regards,

Maïa

Le lun. 4 juin 2018 à 17:53, Daniel Anderson notifications@github.com a écrit :

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datalorax/slidex/issues/2#issuecomment-394405447, or mute the thread https://github.com/notifications/unsubscribe-auth/AmDT9WiK0IlgFH0RRdxrCulGNiX8O6_Tks5t5VfggaJpZM4UYluu .

datalorax commented 6 years ago

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