Back

Dockfile for Jupyter

once the Jupyter container was up and running I confirmed that python was working by compiling and running the python version using mono.  without issue. Once I got into a notebook, this is where the problems began.  I am able to narrow it down to a single line "from QuantConnect import *" One you pass that line it will crash the python kernel every single time.  the output from the notebooks are as followed : The kernel for BasicQuantBookTemplate.ipynb appears to have died. It will restart automatically.the output from the logs are as followed:Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Python.Runtime, Version=1.0.5.20, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'Python.Runtime, Version=1.0.5.20, Culture=neutral, PublicKeyToken=null'
at (wrapper managed-to-native) System.Reflection.MonoMethodInfo.get_method_info(intptr,System.Reflection.MonoMethodInfo&)
at System.Reflection.MonoMethodInfo.GetMethodInfo (System.IntPtr handle) [0x00000] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Reflection.MonoMethodInfo.GetDeclaringType (System.IntPtr handle) [0x00000] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at System.Reflection.MonoMethod.get_DeclaringType () [0x00000] in <b0e1ad7573a24fd5a9f2af9595e677e7>:0
at Python.Runtime.ClassManager.GetClassInfo (System.Type type) [0x00035] in <062a7d6923794bc4bf6c1208dc074447>:0
at Python.Runtime.ClassManager.InitClassBase (System.Type type, Python.Runtime.ClassBase impl) [0x00000] in <062a7d6923794bc4bf6c1208dc074447>:0
at Python.Runtime.ClassManager.GetClass (System.Type type) [0x00028] in <062a7d6923794bc4bf6c1208dc074447>:0
at Python.Runtime.ModuleObject.GetAttribute (System.String name, System.Boolean guess) [0x00074] in <062a7d6923794bc4bf6c1208dc074447>:0
at Python.Runtime.ModuleObject.LoadNames () [0x0002f] in <062a7d6923794bc4bf6c1208dc074447>:0
at Python.Runtime.ImportHook.__import__ (System.IntPtr self, System.IntPtr args, System.IntPtr kw) [0x002b7] in <062a7d6923794bc4bf6c1208dc074447>:0
I Have double checked and all the version numbers are correct for mono and python and so on. this is as far as you can get in the notebook before it crashes, the last line is what causes the kernel to die.  I have again confirmed mono is 5.12 %matplotlib inline
# Imports
from clr import AddReference
AddReference("System")
AddReference("QuantConnect.Common")
AddReference("QuantConnect.Jupyter")
AddReference("QuantConnect.Indicators")
from System import *
from QuantConnect import *

 

Update Backtest







0

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.


In anticipation of someone coming up with a better answer, first you might want to try importing only the modules you need rather than the full QuantConnect reference? It may or may not be crashing because you're trying to import too much. That's at least what I would try first.

0

thanks for the tip.  I confirmed with many variations that anything related to the module "QuantConnect" will crash the kernel.   even something as basic as "from QuantConnect.Data.Market import TradeBar" 

0

Update Backtest





0

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.


Loading...

This discussion is closed