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

template not knitting, read_docx error #41

Closed
evanmascitti opened this issue Oct 19, 2020 · 3 comments
Closed

template not knitting, read_docx error #41

evanmascitti opened this issue Oct 19, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@evanmascitti
Copy link

evanmascitti commented Oct 19, 2020

The template which one can open via the RStudio GUI (file --> new --> R Markdown --> Advanced Word Document) will not knit. I did not alter the document template at all; if I use Ctrl + Shift + k rmarkdown throws an error:

Quitting from lines 73-74 (officedown-word-doc-template.Rmd) 
Error: read_docx only support docx files

I just downloaded the package today using `install.packages("officedown") so it should be version 0.2.0 .

Here are the results of running sessionInfo():

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5         digest_0.6.26      R6_2.4.1          
 [4] magrittr_1.5       officedown_0.2.0   evaluate_0.14     
 [7] zip_2.1.1          gdtools_0.2.2      rlang_0.4.8       
[10] uuid_0.1-4         xml2_1.3.2         rmarkdown_2.4     
[13] tools_4.0.3        officer_0.3.15.005 xfun_0.18         
[16] yaml_2.2.1         compiler_4.0.3     systemfonts_0.3.2 
[19] rvg_0.2.5          memoise_1.1.0      htmltools_0.5.0   
[22] knitr_1.30

Any assistance would be greatly appreciated.

@davidgohel
Copy link
Owner

Thanks, could you provide also the result of getwd()? Is there any blank space in it (as in "C:/blah blah")?

@davidgohel
Copy link
Owner

OK, I found the origin of the issue, it has been fixed in officer, not officedown. You will need to update officer from github until the new version is on CRAN:

remotes::install_github("davidgohel/officer")

@evanmascitti
Copy link
Author

evanmascitti commented Oct 20, 2020

Awesome! I installed the development versions of both officer and officedown, and knitting the example now works. Thank you !

I appreciate your help and the great packages you have written here.

@davidgohel davidgohel added the bug Something isn't working label Feb 4, 2021
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

2 participants