DirectoryNotFoundException: Could not find a part of the path
Author: Tims
Creation Date: 2/23/2019 12:19 AM
profile picture

Tims

#1
Hello, today on 2 different computers I received this error and on one machine I wasn't able to save a strategy with this error present before closing WealthLab Pro. What is the cause of this and how can it be fixed? Thank you.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Kae\AppData\Roaming\Fidelity Investments\WealthLabPro\1.0.0.0\Data\Strategies\2-21-19 WIP \2-21-19 BOLLSTO with STOCHRSI.xml'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at WealthLab.Strategy.SaveToFile(String fileName)
at WealthLab.StrategyManager.SaveStrategy(Strategy s, String folderName, Boolean lastModIsNow, String networkPath)
at WealthLab.StrategyManager.SaveStrategy(Strategy s, String folderName, String networkPath)
at WealthLabPro.ChartForm.SaveStrategyAs()
at WealthLabPro.MainForm.bn(Object A_0, EventArgs A_1)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
profile picture

Eugene

#2
Hello,

The cause of it is inadvertently ending your Strategy folder name with a space when creating it: "..\2-21-19 WIP \..." Now Wealth-Lab has trouble finding that directory name and any strategies inside it.

If WLP is running and the Strategy is open try saving it to a new, correctly named folder. Otherwise to fix it I'd try this:

1. Show hidden files,
2. Close WLP,
3. Open this folder in Explorer: "c:\Users\Windows username\AppData\Roaming\Fidelity Investments\WealthLabPro\1.0.0.0\Data\Strategies\"
4. Rename the folder
5. Start WLP and adjust any links to that Strategy you may have manually e.g. reconfigure Strategy Monitor if it was part of it etc.

P.S. "A wise man's question contains half the answer" as they say. So when you create a forum topic, it's a good idea to give it a meaningful, descriptive name. Compare "DirectoryNotFoundException: Could not find a part of the path" to the featureless "WealthLab Pro 6.9.19.0 Error".
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).