I'm using the VS solution. It builds without error. However, at runtime it generates this exception:
_ramTotalCounter = new PerformanceCounter("Memory", "Available Bytes");
Exception details are:
System.InvalidOperationException
HResult=0x80131509
Message=Could not locate Performance Counter with specified category name 'Memory', counter name 'Available Bytes'.
Source=System
StackTrace:
at System.Diagnostics.PerformanceCounter.InitializeImpl()
at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly)
at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName)
at QuantConnect.OS.get_RamTotalCounter() in C:\Users\Sidney\Desktop\Lean-master\Lean-master\Common\OS.cs:line 49
at QuantConnect.OS.get_TotalPhysicalMemory() in C:\Users\Sidney\Desktop\Lean-master\Lean-master\Common\OS.cs:line 194
at QuantConnect.Lean.Launcher.Program.Main(String[] args) in C:\Users\Sidney\Desktop\Lean-master\Lean-master\Launcher\Program.cs:line 75
Is anyone else having this problem? How did you resolve it?
Alexandre Catarino
We have never seen this issue before and couldn't reproduce the issue.
From my research on this issue, I found this: Performance Counters in .Net.
It might help to fix your particular case.
Douglas Stridsberg
Might also want to give this a shot (check the Answer):
Merlin Brasil
Perfect solution to this vexing problem, Douglas !!!
Note: I did have to run the lodctr /r twice in elevated permissions to get it to work. Otherwise, it's an excellent fix. Worth a beer next time you're in Rio :)
Best,
Merlin
Douglas Stridsberg
Hey! Glad it worked. Very strange error indeed. Compiling sure can be a lot harder than one thinks :(
Sid McFarland
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!