Alteryx Designer Desktop Discussions

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

Prophet error

albert_alaluf
9 - Comet

Hello,

 

I'm getting an error on Prophet in R on Alteryx 2019.4.

 

I'm using the sample model in https://gallery.alteryx.com/#!app/Rossmann-Sales-Forecast-with-Prophet/5df62d020462d70ec8089903

and I have the same version installed on my personal computer which it works fine.

 

Please see the error below.

 

Start: Designer x64: Started running D:\Downloads\alteryx\Rossmann+Sales+Forecast+with+Prophet\Rossmann Sales Forecast with Prophet.yxmd at 03/16/2020 10:08:48
Error: Prophet (23): Tool #15: Error in compileCode(f, code, language = language, verbose = verbose) :
Error: Prophet (23): Tool #15: Error in sink(type = "output") : invalid connection
Error: Prophet (23): Tool #15: Execution halted
Error: Prophet (23): Tool #15: The R.exe exit code (1) indicated an error.
Error: Prophet (22): Tool #15: Error in compileCode(f, code, language = language, verbose = verbose) :
Error: Prophet (22): Tool #15: Error in sink(type = "output") : invalid connection
Error: Prophet (22): Tool #15: Execution halted
Error: Prophet (22): Tool #15: The R.exe exit code (1) indicated an error.
Error: Prophet (19): Tool #15: Error in compileCode(f, code, language = language, verbose = verbose) :
Error: Prophet (19): Tool #15: Error in sink(type = "output") : invalid connection
Error: Prophet (19): Tool #15: Execution halted
Error: Prophet (19): Tool #15: The R.exe exit code (1) indicated an error.
End: Designer x64: Finished running Rossmann Sales Forecast with Prophet.yxmd in 2:56 minutes with 12 errors and 11 warnings

 

 

I do not change or modify anything, just open and run and got these errors. I couldn't find how to fix it. Any suggestions?

 

I believe it doesn't like something on my computer. I have R installed on my computer too, but I see the compiling messages and be sure it is running the R from Alteryx.

 

Thanks

Albert

16 REPLIES 16
albert_alaluf
9 - Comet

I'm seeing the libraries you mentioned is in the directory with today's date. When I run your sample,

 

Info: R (1): During startup - Warning message:
Info: R (1): Setting LC_CTYPE=C.UTF-8 failed
Info: R (1): R version 3.5.3 (2019-03-11) - x86_64
Info: R (1): Loading required package: sysfonts
Info: R (1): Loading required package: showtextdb
Info: R (1): rgeos version: 0.4-2, (SVN revision 581)
Info: R (1): GEOS runtime version: 3.6.1-CAPI-1.10.1
Info: R (1): Linking to sp version: 1.3-1
Info: R (1): Polygon checking: TRUE
Info: R (1): Attaching package: 'AlteryxPredictive'
Info: R (1): The following object is masked from 'package:AlteryxRDataX':
Info: R (1): XMSG
Info: R (1): Loading required package: forecast
Info: R (1): Loading required package: prophet
Info: R (1): Loading required package: rlang
Info: R (1): Loading required package: rBayesianOptimization
Info: R (1): Loading required package: dplyr
Info: R (1): Attaching package: 'dplyr'
Info: R (1): The following objects are masked from 'package:plyr':
Info: R (1): arrange, count, desc, failwith, id, mutate, rename, summarise,
Info: R (1): summarize
Info: R (1): The following objects are masked from 'package:rgeos':
Info: R (1): intersect, setdiff, union
Info: R (1): The following objects are masked from 'package:stats':
Info: R (1): filter, lag
Info: R (1): The following objects are masked from 'package:base':
Info: R (1): intersect, setdiff, setequal, union
Info: R (1): Loading required package: lubridate
Info: R (1): Attaching package: 'lubridate'
Info: R (1): The following object is masked from 'package:plyr':
Info: R (1): here
Info: R (1): The following object is masked from 'package:base':
Info: R (1): date
Warning: R (1): `data_frame()` is deprecated, use `tibble()`.
Info: R (1): This warning is displayed once per session.
Info: R (1): Disabling daily seasonality. Run prophet with daily.seasonality=TRUE to override this.
Info: R (1): Compiling model (this will take a few minutes...)
Info: R (1): If this is the first time fitting a model since package install, this is normal. You should not see this message more than once after install.
Info: R (1): Writing model to: C:/Program Files/Alteryx/R-3.5.3/library/prophet/libs/x64
Info: R (1): Compiling using binary: C:/PROGRA~1/Alteryx/R-35~1.3/bin/x64
Error: R (1): Error in compileCode(f, code, language = language, verbose = verbose) :
Info: R (1): Compilation ERROR, function(s)/method(s) not created! During startup - Warning message:
Info: R (1): Setting LC_CTYPE=C.UTF-8 failed
Info: R (1): file4af86b602f25.cpp:6:36: warning: ISO C99 requires whitespace after the macro name
Info: R (1): #define STAN__SERVICES__COMMAND_HPP#include <boost/integer/integer_log2.hpp>
Info: R (1): ^
Info: R (1): In file included from C:/Program Files/Alteryx/R-3.5.3/library/BH/include/boost/random/detail/large_arithmetic.hpp:19:0,
Info: R (1): from C:/Program Files/Alteryx/R-3.5.3/library/BH/include/boost/random/detail/const_mod.hpp:23,
Info: R (1): from C:/Program Files/Alteryx/R-3.5.3/library/BH/include/boost/random/linear_congruential.hpp:30,
Info: R (1): from C:/Program Files/Alteryx/R-3.5.3/library/BH/include/boost/random/additive_combine.hpp:27,
Info: R (1): from C:/Users/<DELETED>/AppData/Roaming/Alteryx/R-library/rstan/include/rstan/stan_fit.hpp:15,
Info: R (1): from C:/Users/<DELETED>/AppData/Roaming/Alteryx/R-library/rstan/include/rstan/rstan
Info: R (1): Calls: fit.prophet ... <Anonymous> -> <Anonymous> -> force -> cxxfunction -> compileCode
Info: R (1): In addition: Warning message:
Info: R (1): In system(cmd, intern = !verbose) :
Info: R (1): running command 'C:/PROGRA~1/Alteryx/R-35~1.3/bin/x64/R CMD SHLIB file4af86b602f25.cpp 2> file4af86b602f25.cpp.err.txt' had status 1
Error: R (1): Error in sink(type = "output") : invalid connection
Info: R (1): Calls: fit.prophet ... compile_stan_model -> <Anonymous> -> cxxfunctionplus -> sink
Error: R (1): Execution halted
Error: R (1): The R.exe exit code (1) indicated an error.

albert_alaluf
9 - Comet

Please note that I downgraded the sample workflow to 2019.4. I believe this is OK.

WellyLiyanto
8 - Asteroid

Hi @albert_alaluf 

 

Yes, the R version still 3.5.3 so it still OK, from the log message I believe you should also install R packages rstan, after that try to run the workflow again, if it's already ok then your prophet is ready to go

 

Cheers 

albert_alaluf
9 - Comet

Hello,

 

Thank you so much you followup with me, but I have no success. I checked all on my computer, all libraries are installed however it is not working. I tested multiple times and getting the same error. I think I will give up.

 

Albert

albert_alaluf
9 - Comet

I FIXED it. 

 

I was very close to the solution honestly because of you, I continued to troubleshoot. 

 

Let me give you a small history.

 

I made a lot of Google search. Previously I installed R version 6 to my computer and I uninstalled. I remember that I didn't do a good job when installing and I mixed with the libraries with version 3.5 and 3.6.

 

So, I found 2 library location for R; one with Alteryx and other which it is on under My Documents.

 I used this command to make Alteryx only ---> > .libPaths(.libPaths()[2]) (Alteryx was showing as secondary.

 

Then I reinstalled the libraries you mentioned (most likely I had an issue with ggplot2 which it was asking R 3.6 and was not loading)

 

And now it is working. 

 

So this makes sense because my personal computer has only one R folder.

 

So the lesson I get, if you use Alteryx, be careful with 3rd apps such as R and Python.!!!!!

 

Anyway, thank you for your follow up with me.

 

Regards

Albert

 

 

WellyLiyanto
8 - Asteroid

Hi @albert_alaluf 

 

That's really nice to hear!! Hope this discussion will help more people that want to use Prophet as one of their option for seasonal Time Series.

 

Cheers 

 

Welly

isevendays
5 - Atom

This also helped me, but I found your answer later.

 

When installing libs you need to ensure that [1] "C:/Users/user_name/AppData/Local/Alteryx/R-3.5.3/library"  comes first

 

I had win-library folder set by default and had a lot of compilation issues.

 

Also, you may need to go to C:\Users\seven\AppData\Local\Alteryx\R-3.5.3\etc to both i386 and x64 folders and change

BINPREF ?= c:/Rtools/mingw_32/bin/ (for x64 set minigw_64)

It was set to some folder at disk "w:/" I don't know how could this error got into production build. I was unable to install Rcpp (required for dplyr) until I changed these lines.

 

Run Rterm at: C:\Users\seven\AppData\Local\Alteryx\R-3.5.3\bin\x64

and execute

myPaths <- .libPaths() # get the paths
myPaths <- c(myPaths[2], myPaths[1]) # switch them
.libPaths(myPaths) # reassign them

> .libPaths()
[1] "C:/Users/seven/AppData/Local/Alteryx/R-3.5.3/library" <-- this should come first
[2] "C:/Users/seven/Documents/R/win-library/3.5"

Labels