Hello,
I have folow this video instructions to install and configure Skylight Version 0.1.11:
https://www.youtube.com/watch?v=OOFZqZdPHCM
After that, I open my project (that was originally coded in QuantConnect Web IDE) in PyCharm, and add the all the imports needed. Autocomplete feature worked great.
But when I go to the QuantConnect Web IDE, I found these new errors in my project:
10 | 02:27:50:
11 | 02:27:50:
12 | 02:27:50:
13 | 02:27:50:
14 | 02:27:50:
Any idea?
Thanks in advance
Gahl Goziker
Hi Jose,
We don’t allow using any method name to with “open” in QuantConnect Cloud, to avoid accidental invocation of Python’s open() method, which is used to open files. This is a security measure.
The build error indicates that the project contains a method with “open” in the name. Renaming this method should solve the issue.
Best,
Gahl Goziker
Jose
Hi,
It is possible to reproduce the error using just the empty project template, so no "open" word in the code.
The problem appear after I add the Python interpreter to the project in PyCharm. With this step, a "venv" directory is added to the project and then the build problems happen
class MultidimensionalVerticalGearbox(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2020, 3, 21) # Set Start Date
self.SetCash(100000) # Set Strategy Cash
# self.AddEquity("SPY", Resolution.Minute)
def OnData(self, data):
'''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
Arguments:
data: Slice object keyed by symbol containing the stock data
'''
# if not self.Portfolio.Invested:
# self.SetHoldings("SPY", 1)
Gahl Goziker
Hi Jose,
The issue might arise from PyCharm using the wrong Python interpreter. We should use 3.6.8, as this is a known compatible version and other versions may have issues.
Can it run outside of PyCharm?
Which Python interpreter does the PyCharm project use?
Please refer to this official guide on running LEAN in python locally,.
Also refer to this video on using SkyLight with PyCharm.
Best,
Gahl Goziker
Jose
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!