Early bird tickets for Inspire 2023 are now available! Discounted pricing closes on January 31st. Save your spot!

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

error stating .OnLoad failed in loadNamespace() for pdftools

UgoAgo
Alteryx Alumni (Retired)
Created

Issue


When running a workflow that contains a tool that makes use of the pdftools package, it throws up the onLoad failed error.
Error: .onLoad failed in loadNamespace() for 'pdftools', details:

image.png

Environment Details

 
  • Alteryx Designer (All)
  • Alteryx Predictive Tools

 

Cause


There are multiple issues that can cause this, some of which are as follows:

  • A mismatch between Designer and Predictive tools version.
  • Missing pdftools package in the required R Library folder
  • Issues with the Rcpp Installation


Resolution


Please ensure that you have the correct predictive version installed for your Designer especially if you had this error after upgrading Designer. To get the right Predictive Tools, please click here .

Click on your installed Designer Version, then select the right predictive tools to install based on your Designer(Admin or Non-Admin version). Below is a screenshot showing links from the 2021.3 Designer page.


   image.png

Once this is taken care of, please follow the steps in the solution below

Solution

 
  1. Find your R Tools Folder
  • Non-Admin:%LOCALAPPDATA%\Alteryx\R-{VERSION}\
  • Admin: C:\Program Files\Alteryx\R-{VERSION}\
  1. Make a backup and delete the Pdftools and Rcpp folders if they exist  
  • Non-Admin:%LOCALAPPDATA%\Alteryx\R-{VERSION}\library\Rcpp
  • Admin: C:\Program Files\Alteryx\R-{VERSION}\library\Rcpp
  • Non-Admin:%LOCALAPPDATA%\Alteryx\R-{VERSION}\library\pdftools
  • Admin: C:\Program Files\Alteryx\R-{VERSION}\library\pdftools
image.png
 
  1. Run the R terminal as an Administrator:
  • Non-Admin:%LOCALAPPDATA%\Alteryx\R-{VERSION}\bin\x64\Rterm.exe
  • Admin: C:\Program Files\Alteryx\R-{VERSION}\bin\x64\Rterm.exe
  1. Reinstall the Rcpp package with the following command:
  • install.packages("Rcpp", type="binary", lib="The_Location_of_package_folder_deleted above")
  • for example install.packages("Rcpp", type="binary",lib="c:\\Program Files\\Alteryx\\R-3.6.3\\library")
  1. Reinstall the pdftools package with the following command:
  • install.packages("pdftools", lib="The_Location_of_package_folder_deleted above")
  1. Restart Designer and run your workflow again


Additional Resources

 
Comments
LeandroC
5 - Atom

Thank you, it worked!

 

Leandro C.