Skip to content

Troubleshooting: Neural Engine Setup (Windows Only)

This section documents known issues we ran into and how they were resolved. If you hit a wall, scan here first — the fix is probably one we’ve already handled.

⚙️ R + RTools 42 Issues

🔴

gcc not found (system("gcc --version") returned 127)

Cause: RTools was installed but the C++ compiler (mingw64) was not downloaded via pacman.
Fix: Manually install toolchain using RTools Bash:
pacman -Sy --noconfirm
pacman -S --noconfirm mingw-w64-ucrt-x86_64-toolchain
✅ Then verify with:
Sys.setenv(PATH = paste(
"C:/rtools42/ucrt64/bin",
"C:/rtools42/usr/bin",
Sys.getenv("PATH"),
sep = ";"
))

system("gcc --version") # Should return version info
system("mingw32-make --version") # Should return GNU Make

🔴

RGui can’t find the RTools compiler

Cause: Wrong path environment or missing build tools
Fix: Ensure this is set every time before installing packages from source:
Sys.setenv(PATH = paste(
"C:/rtools42/ucrt64/bin",
"C:/rtools42/usr/bin",
Sys.getenv("PATH"),
sep = ";"
))

🧠 TensorFlow + Python Virtual Environment Issues


🔴

Keras model threw: “Only input tensors may be passed as positional arguments”

Cause: Legacy keras (v2) syntax used with keras3
Fix: Use correct keras3 syntax with layer_input():
library(keras3)

model <- keras_model_sequential(input_shape = c(10)) |>
layer_dense(units = 32, activation = "relu") |>
layer_dense(units = 1)

🔴

Python version not properly linked in R

Fix: Check Python path using:
library(reticulate)
py_config()
You should see:
python: C:/Users/YOU/Documents/.virtualenvs/r-tensorflow/Scripts/python.exe
If not, run:
tensorflow::install_tensorflow()
And restart R session.

🔌 Recharge API Issues


🔴

Object ‘res’ not found

Cause: You tried to inspect res outside of the function where it was defined.
Fix: Add print inside the function:
print(status_code(res))

🔴

Duplicate row.names when calling rbind()

Cause: Recharge returns unkeyed pages, so R sees duplicate row indices
Fix: Use dplyr::bind_rows() instead of do.call(rbind...):
return(dplyr::bind_rows(all_data))


✉️ Klaviyo API Issues


🔴

401 Unauthorized — Missing or Invalid Access Token

Cause: Wrong header format, missing Bearer or outdated API revision
Fix: Use correct header and revision format:
add_headers(
`Authorization` = "Klaviyo-API-Key YOUR_API_KEY",
`Accept` = "application/json",
`revision` = "2025-04-15"
)

🔴

Empty $data from profile endpoint even with 200 response

Cause: API accepted request but filter was malformed due to old revision or wrong encoding
Fix: Use updated format (2025-04-15) or check klaviyo for latest version and encode email correctly:
url <- "https://a.klaviyo.com/api/profiles"

queryString <- list(
filter = "equals(email,'example@example.com')"
)

response <- GET(
url,
query = queryString,
add_headers(
`Authorization` = paste("Klaviyo-API-Key", api_key),
`Accept` = "application/json",
`revision` = "2025-04-15"
)
)

Load content from share.geckoboard.com?
Loading external content may reveal information to 3rd parties. Learn more
Allow
Load content from share.geckoboard.com?
Loading external content may reveal information to 3rd parties. Learn more
Allow
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.