Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

PDF Input tool Error Message

AT_AYX
8 - Asteroid

Hi everyone,

 

I tried the PDF Input tool found in the gallery and I stumbled upon this error : "PDF Input (14): BatchPDFInput (26): Record #1: Tool #2: Error: .onLoad failed in loadNamespace() for 'pdftools' ".

 

So I followed a link for solving the issue and installing the missing R package from the gallery.

 

However, the error still persists and I was just wondering why it didn't work.

 

Please, if you could help me resolve the issue.

 

 

Link:  https://www.youtube.com/watch?v=0aM9YqC1Uuo&t=123s&ab_channel=NathanPatrickTaylor

PDF Input: https://gallery.alteryx.com/#!app/PDF-Input/5b685aff0462d710907f7a3b  

Installing R packages: https://gallery.alteryx.com/#!app/Install-R-Packages/5d9264328a933711e447387c 

Snapshot:

 r.PNG

Pulling data from a PDF is super fun (said no one, ever). In this video, I'll do a quick demo of the install process for The Information Lab's PDF Input too...
8 REPLIES 8
CharlieS
17 - Castor
17 - Castor

I'm worried that the difference in R versions might be causing a problem. That macro was built for R-3.4.4 and it looks like you're using R-4.0.4 which comes with Designer 2021.2. I'm not sure what version of 'pdftools' you obtained since it depends on the method and source. Might be worth double checking. 

 

Are there any messages in the results window from the R tool that might indicate a version compatibility issue? 

AT_AYX
8 - Asteroid

Hello @CharlieS ,

 

Thank you for taking the time to view my problem.

Unfortunately, there is no compatibility issue that was shown. However, what was most interesting is that when I tried to replicate the R code in an R tool, it generates the same error and when trying to reinstall the package using the Analytic app (Install R package), the transcrib.yxzb shows an empty output (meaning that it's already installed I think)

OllieClarke
14 - Magnetar
14 - Magnetar

Hi @AT_AYX I had this exact problem the other day. The issue I had was that the version of 'Rcpp' that alteryx installs with R 4.0.4 is an older version.

You can either delete the folder of Rcpp in the library and then reinstall a new one, or you can apparently run the following command in the R.exe that Alteryx installs.

 

update.packages()

 

 

(taken from the following SO post: https://stackoverflow.com/questions/68416435/rcpp-package-doesnt-include-rcpp-precious-remove)

 

Hope that helps,

 

Ollie

 

edit: - I also reinstalled 'pdftools' when I was trying to fix this, but I'm not sure if that's a necessary step or not

AT_AYX
8 - Asteroid

Hi @OllieClarke ,

 

When I tried your solution (in both ways), I got the following errors:

 

  • Error: R (1): Error in contrib.url(repos, type), when using the command in R tool (update.packages())
  • R (1): Error: Unable to load the Rcpp package - Use the R installer provided by Alteryx when trying to install it via Install R packages (after deleting the library)

 

OllieClarke
14 - Magnetar
14 - Magnetar

Hi @AT_AYX sorry for the delayed response! 

 

Do you have the Admin version of Alteryx? I just ran the update.packages() command on my machine and didn't get your error, so these steps seemed to work:

Firstly navigate to this R.exe: - "C:\Program Files\Alteryx\R-4.0.4\bin\R.exe"

Then right click it and 'run as administrator',

Then type in 'update.packages()' and hit 'y/n' for the packages until you reach Rcpp (where you should hit 'y'). 

Then let it do its thing. 

 

If you've got the local version, then I think you'll need to navigate to the 'R.exe' in "C:\Users\[User]\AppData\Roaming\Alteryx" (I can't remember exactly where in there it is I'm afraid). 

 

If you didn't want to do the update.packages(), then deleting the 'Rcpp' folder in either
"C:\Program Files\Alteryx\R-4.0.4\library" (admin) or
"C:\Users\[User]\AppData\Roaming\Alteryx\R-library" (non-admin)

and then install it to that location again either using the R.exe mentioned above, or the Install R packages app available here: [link] 

 

Hope that helps!

 

Ollie

mdelaney
7 - Meteor

Thanks, Ollie. This worked for me on R-4.0.5 as well. I was getting the same error with the PDF Input tool referencing 'Rcpp", and updating packages fixed it.

 

Matt

someotherguy
7 - Meteor

initially let Install+R+Packages install to the default director which was wrong because I'm

running non-admin version of Designer so had to choose specific location: C:\Users\(user)\AppData\Local\Alteryx\R-4.0.5\library

 

also had to delete the Rcpp file from that library then re-install

Labels