title: Jupyter SAS kernel failing inside Docker container
body: <p>For some reason I'm unable to run SAS notebooks inside a Jupyter Docker container. I can run SAS code inside <em>Python</em> notebooks via saspy, but the SAS kernel keeps throwing errors on me.</p>
  <p>I'm using the image jupyter/pyspark-notebook:notebook-6.4.2 as the base, and connecting to a remote server via IOM. If I run a Python notebook, eg with</p>
  <pre class="lang-py prettyprint-override"><code>import saspy
  %reload_ext saspy.sas_magic
  ss = saspy.SASsession(cfgname=&quot;xxx&quot;)
  </code></pre>
  <p>then the connection works fine. Sometimes it times out, but that's probably a server issue.</p>
  <p>However if I run a SAS notebook, when I try to submit a code chunk I get an error result:</p>
  <pre><code>[&lt;class 'TypeError'&gt;, TypeError(&quot;Frame 0 ({'shell': [b'f8fd30a1-60bc-4f25-...) does not support the buffer interface.&quot;), &lt;traceback object at 0x7fad01e41100&gt;]
  </code></pre>
  <p>There are also a bunch of error messages in the terminal window running the container:</p>
  <pre><code>notebook_1  | [I 17:14:56.181 NotebookApp] Kernel started: 58182c39-9df4-4922-b068-1d6bde76c31a, name: sas
  notebook_1  | [IPKernelApp] ERROR | Exception in message handler:
  notebook_1  | Traceback (most recent call last):
  notebook_1  |   File &quot;/opt/conda/lib/python3.9/site-packages/ipykernel/kernelbase.py&quot;, line 352, in dispatch_shell
  notebook_1  |     await result
  notebook_1  |   File &quot;/opt/conda/lib/python3.9/site-packages/ipykernel/kernelbase.py&quot;, line 642, in execute_request
  notebook_1  |     reply_content = self.do_execute(
  notebook_1  |   File &quot;/opt/conda/lib/python3.9/site-packages/metakernel/_metakernel.py&quot;, line 397, in do_execute
  notebook_1  |     retval = self.do_execute_direct(code)
  notebook_1  |   File &quot;/opt/conda/lib/python3.9/site-packages/sas_kernel/kernel.py&quot;, line 213, in do_execute_direct
  notebook_1  |     res = self.mva.submit(code, prompt=self.promptDict)
  notebook_1  | AttributeError: 'NoneType' object has no attribute 'submit'
  </code></pre>
  <p>The dockerfile is intended for use behind a corp firewall so contains some confidential entries, making it hard to give a reproducible example. But the gist of it is:</p>
  <pre><code>FROM jupyter/pyspark-notebook:notebook-6.4.2
  
  RUN mamba install -c conda-forge -y nodejs &amp;&amp; \
      conda clean --all -f -y &amp;&amp; \
      fix-permissions $CONDA_DIR &amp;&amp; \
      fix-permissions /home/$NB_USER
  
  RUN pip install jupyterlab_templates &amp;&amp;\
      jupyter labextension install jupyterlab_templates &amp;&amp; \
      jupyter serverextension enable --py jupyterlab_templates
  
  RUN pip install pytest sas_kernel
  
  # Adding SAS config
  ADD saspy/*.jar /opt/conda/lib/python3.9/site-packages/saspy/java/
  ADD saspy/sascfg_personal.py /opt/conda/lib/python3.9/site-packages/saspy/
  </code></pre>
  <p>Some specific versions:</p>
  <pre><code>Python 3.9.6
  
  jupyter core     : 4.7.1
  jupyter-notebook : 6.4.2
  qtconsole        : not installed
  ipython          : 7.26.0
  ipykernel        : 6.0.3
  jupyter client   : 6.1.12
  jupyter lab      : 3.1.4
  nbconvert        : 6.1.0
  ipywidgets       : 7.6.3
  nbformat         : 5.1.3
  traitlets        : 5.0.5
  
  sas-kernel                2.4.11
  saspy                     3.7.5  
  </code></pre>
  <p>How can I fix this?</p>