datalorax / slidex

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

Error in convert_pptx(...): Result 1 must be a single double... #22

Closed randycasburn closed 4 years ago

randycasburn commented 4 years ago

To recreate:

  1. install package
  2. Follow instructions to convert file named "test.pptx" with author.
> library(slidex)
>convert_pptx("test.pptx", author = "ME")

ERROR:

Error in convert_pptx("test.pptx", author = "ME") : 
  Result 1 must be a single double, not a double vector of length 0
In addition: Warning message:
`cols` is now required.
Please use `cols = c(text)` 

Can't share pptx, but it is in english has images and no headers or footers. Simple, standard slide presentation.

What can I do?

datalorax commented 4 years ago

Hi @randycasburn, unfortunately I'm not sure how to help in this case without being able to reproduce the error. If you run the following code do you still get an error? If so, maybe try reinstalling?

library(slidex)
pptx <- system.file("examples", "slidedemo.pptx", package = "slidex")

convert_pptx(path = pptx, author = "ME")
randycasburn commented 4 years ago

This is what was returned:

> library(slidex)
> pptx <- system.file("examples", "slidedemo.pptx", package = "slidex")
> 
> convert_pptx(path = pptx, author = "ME")
Warning messages:
1: `cols` is now required.
Please use `cols = c(text)` 
2: `cols` is now required.
Please use `cols = c()` 
3: `cols` is now required.
Please use `cols = c()` 
4: `cols` is now required.
Please use `cols = c()` 
5: `cols` is now required.
Please use `cols = c()` 
6: `cols` is now required.
Please use `cols = c()` 
7: `cols` is now required.
Please use `cols = c()` 
8: `cols` is now required.
Please use `cols = c()`

I'm afraid this is all because I'm not an R dev. Perhaps I have an environment issue?

datalorax commented 4 years ago

Okay, that's just a warning that actually shouldn't matter. Do you see the Rmd in your directory? (even if it didn't pop up directly)

randycasburn commented 4 years ago

Yes, no error was emitted, and yes the content was created. But, that doesn't answer the question of why my presentation doesn't convert. I've created a single page presentation and tried that to no avail. I don't think I'm importing the file properly.

datalorax commented 4 years ago

Yeah unfortunately I don't think I can really help here unless you can share the powerpoint. If I can't reproduce the error it's nearly impossible to know where it's coming from.

randycasburn commented 4 years ago

text2.pptx

This one does the saem thing

datalorax commented 4 years ago

So when I render just this one, the YAML pops up but is missing the --- at the bottom. If you put those in manually, it should work. Alternatively, you can add a "throwaway" slide and it should also work. When I added another slide it rendered fine. See the attached screen shots and let me know if it's still not working.

Screen Shot 2020-01-28 at 2 42 19 PM Screen Shot 2020-01-28 at 2 42 47 PM Screen Shot 2020-01-28 at 2 41 34 PM
randycasburn commented 4 years ago

Command line you used? And where did you put the file? I used setwd('~') and have been attempting to load the file from there with convert_pptx("./test2.pptx", author="me"). Thanks for all the help!!

datalorax commented 4 years ago

I put it on my desktop and then used convert_pptx("~/Desktop/text2.pptx", author = "ME").

randycasburn commented 4 years ago

Well, both your sample and my simple versions work. But, a more complex presentation just isn't getting done. I removed the template, all styles, all two column slides, all ppt drawings and I still am presented with the same error. I left in positioned text boxes and imported images. Thanks again for your help and work on what appears to have some great potential.

datalorax commented 4 years ago

Sorry it's not working for you. Generally those sorts of things shouldn't cause any errors so I'm not sure what's going on.