NinjaTrader and OneDrive work together in most cases, but an occasional OneDrive sync failure can block NinjaScript add-on imports into NinjaTrader Desktop until it is resolved.
Error message
One of these errors may appear while importing a NinjaScript add-on:
- "Unhandled exception: Access to the path 'C:\Users\OneDrive\Documents\NinjaTrader 8\etc' is denied."
- "Unhandled exception: Could not find part of the path 'C:\Users\OneDrive\Documents\NinjaTrader 8\etc'."
Cause
In rare cases the Documents/NinjaTrader 8 folder fails to sync properly with OneDrive, which blocks add-on imports until it is fixed.
Solution
Important: Only follow these steps if you see one of the exact errors above. If you simply suspect OneDrive is involved, first make sure Windows is fully updated. Do not uninstall OneDrive.
Step 1 — Stop OneDrive from backing up Documents
- Shut down NinjaTrader.
- Right-click the OneDrive cloud icon in the taskbar tray and select Settings.
- Open the Sync and backup tab, then click Manage backup.
- Turn off the slider next to Documents and click Stop backup.
Step 2 — Copy the NinjaTrader 8 folder to your local drive
- Open File Explorer (Windows + E) and go to your local Documents folder (now empty).
- Use the "Where are my files?" icon (right-click → Open in a new window) to reach the OneDrive Documents/NinjaTrader 8 folder.
- Copy the entire NinjaTrader 8 folder into your local Documents folder.
Step 3 — Reinstall NinjaTrader Desktop
This does not affect your custom data or settings.
- Open Windows Settings → Apps → Installed apps and uninstall NinjaTrader Desktop.
- Download and install the latest release from your NinjaTrader Account Dashboard (see the installation guide).
You should now be able to import your NinjaScript add-on without errors.
Step 4 — Clear residual errors and repair the platform
If the error persists:
- Close NinjaTrader and drag the Documents/NinjaTrader 8/tmp folder onto your Desktop.
- Open the Windows Control Panel (not Settings) → Programs and Features.
- Select NinjaTrader and click Repair.
- Reopen NinjaTrader and try the import again.
Source: NinjaTrader Support — Unhandled exception: Access to the path is denied (OneDrive Error)
Comments
0 comments
Article is closed for comments.