collective.sendaspdf "Running wkhtmltopdf failed" - plone

I am working on installing collective.sendaspdf on a Plone 4.2.4 server.
This add-on provides two extra document action buttons, one "Send as PDF" and the other "View as PDF"
After following instructions on the packages pypi page. I get the following traceback when trying to click one of the aformentioned document action links:
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute
'_Thread__block'",) in <module 'threading' from '/home/dan/Plone/Python-2.7/lib/python2.7
/threading.pyc'> ignored
2013-02-13 14:04:50 ERROR collective.sendaspdf Running wkhtmltopdf failed. Please check that you
use a version compatible with your OS and the version is 0.9.
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute
'_Thread__block'",) in <module 'threading' from '/home/dan/Plone/Python-2.7/lib/python2.7
/threading.pyc'> ignored
2013-02-13 14:05:55 ERROR collective.sendaspdf Running wkhtmltopdf failed. Please check that you
use a version compatible with your OS and the version is 0.9.
I have tried pinning wkhtmltopdf to the version it requires, under the [versions] heading but that has done nothing for me. I have tried just loading the collective.sendaspdf alone under the eggs section but again, that doesn't work either. I have tried manually downloading them, putting them into my src folder and configuring the develop section accordingly, but that again gives me the same error. I've even tried easy_install but I get the same problems.
The instructions on the pypi page can't be followed to the letter as I believe the url under the [wkhtmltopdf] heading leads to a corrupted archive (i can't use tar, gzip or bunzip2 to extract the files) however he does have zip files contaning the source I have tried manually downloading and using easy_install) but to no avail.
I've been researching the
ERROR collective.sendaspdf Running wkhtmltopdf failed. Please check that you
use a version compatible with your OS and the version is 0.9.
Error message that I'm getting but I don't seem to see any Plone users having difficulty, it seems most people are using this with Rails.
Does anyone know how I can:
Get this to work
Find an alternative way of converting HTML from Plone to a PDF.
I have tried Form2PDF, zopyx.smartpringng, and now collective.sendaspdf (this one I have gotten the furthest with) - except it is falling at the last hurdle
Thanks.

I fear you've failed at the first hurdle: installing wkhtmltopdf. Either visit https://code.google.com/p/wkhtmltopdf/ and follow their instructions for installation, or look there to find the URL for a version compatible with your system

Related

Error message when trying to build website using distill: invalid version specification

I have a distill website. When I try to hit "Build Website" using RStudio I get this error message:
Error: invalid version specification '2021.09.0+351' Execution halted
Exited with status 1.
Both issues are already fixed in development version of distill.
It was previously found by us or reported in Github Issues. Don't hesitate to look there when you have trouble, and also test the development v
This issue
Error: invalid version specification
is caused when you used the last RStudio IDE version.
The blank page issue is caused when using last rmarkdown version.
We'll make a patch release to CRAN very soon, but in the meantime, please install the development version of distill
remotes::install_github("rstudio/distill")
It is not a fully satisfactory answer, but I faced the same issue. Running:
rmarkdown::render_site(encoding = 'UTF-8')
on a terminal/command line window does run the command fully. However, the site is created only with blank pages (even though if you check the html source, the page is there, hidden).
I'm tracing the blank pages to the upgrade of the rmarkdown package, in my case, from 2.8 to 2.11. This brings with it a new dependency of jquerylib which might be a cause of this as well. This has started to happen with the new version of RStudio 2021.09.0 Build 351. This is consistent with the error message you and I got.
I tried to downgrade rmarkdown but every time you knit from RStudio with that version, it forces the upgrade. I think this should be reported as a bug, as it was clearly working before and now there are several issues that all seemed to be linked with all the upgrades (not compiling from inside RStudio, compiling with blank pages).
(I would have added this as a comment rather than a solution, but I do not have enough reputation yet)

Error while loading the Code Generator toolbox in Scilab

I installed Scilab 5.5.2 on Windows 10, and then installed the Scilab Code Generator toolbox.
However, when I start Scilab, the following message appears and I can't use the toolbox. This problem occurs for every toolbox.
Start Scilab Code Generator
Version: 0.9.20190122
Load macros
atomsLoad: An error occurred while loading 'xcos_code_generator-0.9.20190122':
File "C:\Users\光\AppData\Roaming\Scilab\SCILAB~1.2\atoms\x64\XCOS_C~1\09E129~1.201\macros\names" does not exist or read access denied.
(光 is my username.)
I suppose the problem comes from "\Scilab\SCILAB~1.2" in the middle of the file path. In my computer, the only folder in "Scilab" is "scilab-5.5.2", so indeed the software cannot find the file it's looking for.
Does anyone have any ideas?
I need to use the toolbox at work soon, so any help is greatly appreciated. Thank you in advance.
Note: I'm not using the latest Scilab 6.0.2 because it fails to work on my computer. It closes immediately after I open it.
I solved the problem by myself.
It was my user name "光" that caused the problem. I found people saying that user names in full-width characters such as Japanese sometimes cause problems like this.
The solution is to create another user account with a name in half-width characters and install Scilab in that account. (Just changing the full-width user name doesn't work because it doesn't change the filenames that already exist.)
I couldn't find the solution until today because I was searching for solutions only in the context of Scilab, not in the context of software in general.
I hope this answer helps someone.
I'm not sure why you are using an outdated version of Scilab. The latest version is 6.0.2 on Windows. If the newer version doesn't work properly then that's the problem you need to fix first. To test your Scilab installation you may run it in the terminal. Find the installation folder. For me, it is C:\Program Files\scilab-6.0.2\bin the on cmd go to the path and run Scilex.exe. If not uninstall everything and install it in a proper way. My recommendation is to uninstall the old Scilab you already have. Then:
Install Chocolatey package manager
Open PowerShell as Admin and run choco update all -y, once in a while update your packages this way.
run choco install Scilab -y
then open the Scilab software
run the atomsInstall("xcos_code_generator") in the console
runt the atomsLoad("xcos_code_generator") to make sure your package is installed properly. You should see this as a result:
--> atomsInstall("xcos_code_generator")
Scanning repository http://atoms.scilab.org/6.0 ... Done
ans =
!xcos_code_generator 0.9.201901 user SCIHOME\atoms\x64\xcos_code_generator\0.9.201901 I !
--> atomsLoad("xcos_code_generator");
Start Scilab Code Generator
Version: 0.9.20190122
Load macros
Load help
Load demos

How do i install beautify in brackets editor

I am trying to install beautify via the extension manager but I'm getting an error:
" installation failed, unknown internal error"
i can see clearly that brackets is connected to internet because when i try to search for beautify extension i see the results.
I don't think this is a problems with the beautify extension but the brackets installation itself. In particular, the local nodejs installation. See https://github.com/adobe/brackets/issues/12538. This seems to be preventing ANY extension from being installed.
If you navigate to the brackets directory you should see the local brackets node installation. In the console here type node -v. This should give you the node version, but if it gives you an error message then the problem is with that installation of node.
Are you on windows? I solved this problem by copying from my own installation of node the node.exe from C:\Program Files\nodejs to C:\Program Files\Brackets. Of course, I don't know if this could have any unforeseen side effects - but it seems to work.

Knitr pandoc Execution halted in R

Knitr / Rmarkdown Execution halted
When I run Knitr and Rmarkdown, even with the knitr example scripts, I get the below error message.
Error in system(paste(shQuote(pandoc_path), "--version"), intern = TRUE) :
'"C:/Program Files/RStudio/bin/pandoc/pandoc"' not found
Calls: <Anonymous> ... get_pandoc_version -> with_pandoc_safe_environment -> force -> system Execution halted
I have installed and loaded knitr and rmarkdown from the libraries and alternatively using dev tools to get the most recent versions from github.
As it was working previously and I haven't changed any settings, I was wondering whether it might be due to the new R release and whether that has caused this?
I have tried uploading pandoc to the specific location it requested in the error but the online guidance was difficult to follow so didn't move into folder just it case it made it worst, as it was not required before I was confused as to why it was an error?
Not sure what else to try out, I have googled, stackflowed and explored knitr and pandoc webpages for any clues but with not success.
If anyone knows how to fix this as soon as possible I would be very grateful!!
I know this is a very old question, but I had the exact same issue, where knitting an Rmd file worked perfectly yesterday, and today, stopped working with the identical error message above. Even knitting the default Rmd starter document failed.
It's possible that a Windows patch was applied by our IS folks that may have broken something, as I had not changed my setup at all.
Doing a Sys.which('pandoc') suggested that it was looking in the wrong place (a user-specific location).
Updating RStudio did not help. Adding the following to my Rmd file also did not work:
Sys.setenv(RSTUDIO_PANDOC="PATH_TO_MY_PANDOC_BIN")
What eventually worked was a subset of the response by Ivo Fugers:
install.packages('installr')
install.pandoc()
(I wasn't paying close attention but think I allowed it to uninstall another version of pandoc.) After a system restart, knitting is working again.
Hope this helps folks in the future, as it seems to be a problem that still sporadically recurs.
I had a similar problem in a Statistical Computing class. A solution that worked for some of my classmates (including myself) is installing a few version of MikTex (takes about an hour). Otherwise, this is a solution that our teacher gave us:
So here is a possible strategy when you end up with a pandoc error, or when your Latex Equations do not show up in the 'markup':
Step 1
Re-install pandoc manually in your R console:
installing/loading the package:
if(!require(installr)) { install.packages("installr"); require(installr)} #load / install+load installr
Installing pandoc
install.pandoc()
Step 2
Download the the self-extracting protext.exe file from http://www.tug.org/protext/ . Install MikTex from this .exe file using the default settings...
2a. Make sure you allow Protext to install packages on the fly without asking permission.
Step 3
Look at https://tex.stackexchange.com/questions/81739/the-memory-dump-file-could-not-be-found , not the solution. Change the persmissions of all users in
C:\Users\YourUsername\AppData\Local\Temp
and
C:\Program Files\MikTex 2.9\
to full control.
How to do this? Go to C:\Users\YourUsername\AppData\Local , and right click on the folder Temp. Go to properties --> Security... and make sure all users listed there (even the trusted install) will have full control acces.
I faced the exact same problem yesterday and shocked because everything was working until day before yesterday. I was finishing my project in R markdown and it started throwing error.
Without having much help, I just have upgraded my RStudio to its latest version (0.98.1091). It took less than 10 minutes and everything started working as it was. I believe this sudden chocking was due to Windows patch update, but not 100% sure.
change your file name "C:/Program Files/RStudio/bin/pandoc/pandoc" into
"C:/ProgramFiles/RStudio/bin/pandoc/pandoc" or something else.
It doesn't allow space in the file address (like Program Files).

Lyx 2.1 RC1, warning message "the selected document class Article" requires external files

I just installed 2.1 RC1 bundle on windows 7
Each time I try to save a document (also when I first open Lyx), I get this message
LyX-210RC1-Bundle-1.exe
why this happens? Do I need to configure something else? I had Lyx 2.0 before, but I uninstalled that before installing Lyx 2.1
I also got this message. For me, this is what I think was going on:
The first execution of Lyx very quietly (i.e., in the background) performs package updates for MiKTeX. Afterwards, it actually launches Lyx.
However, if you launch a second invocation of Lyx immediately after the first (since nothing has yet displayed), it will launch w/o the packages it requires and result in the message that you see.
I suppose if MiKTeX was not / improperly installed, you could also encounter this issue.
#scottkosty is right--this should not happen and having downloaded the latest version of LyX 2.1.1. I had the same problem (NOTE: I am, however, working on a Mac). These are the steps I took to finally get things working in my case:
If you have the above issues working on a Mac with OS X try the following:
1. reinstall latest version MacTeX at: [https://tug.org/mactex/][1]
2. install latest version of LyX: 2.1.1. (see: [http://www.lyx.org/Download][2])
3. Tools --> Reconfigure.
4. Restart, check: Document --> Settings --> Document Classes: these should now be available.
i had a similar problem but I believe I sorted it. If you can get someone to send you their 'templates' folder (i just put my one from my old laptop on googledrive), then go to lyx, go preferences, go paths, and then set the path to go to the location of your new templates folder. I then restarted it and it worked! Hope it helps :)

Resources