jupyter-xeus / xeus-robot

Jupyter kernel for Robot Framework
BSD 3-Clause "New" or "Revised" License
31 stars 11 forks source link

TestSuiteError: Invalid dictionary variable item (with perfectly valid dictionary) #94

Open pianofab opened 2 years ago

pianofab commented 2 years ago

Trying to run my fledgling Robot Framework project (which runs fine under both Robot 4.1.3 and pabot) and noticed a wierd failure when running under xeus-robot / JupyterLab. On my Ubuntu 20 Linux box, under miniforge, installed as follows in a clean env:

conda install xeus-robot voila jupyterlab

Then:

jupyter lab --no-browser --ip=0.0.0.0

I am accessing JupyterLab from my Windows box via Edge / Chrome and it works great.

I pared down the failing case to creating a small file dictionarybug.robot with the following content:

*** Settings ***
Documentation   Reproduces dictionary bug with xeus-robot.

*** Variables ***
&{CONNECTIONS}  1=IxServerTest  4=UartTest  23=FprogTest    48=TECProxyTest 119=IxIoTest    129=L23Test 208=PGIDIxAccumulatorTest

Then, from a blank JupyterLab Robot notebook I run the following:

*** Settings ***
Documentation   Reproduces a bug with xeus - Robot Framework.
Resource    ${EXECDIR}${/}dictionarybug.robot

*** Tasks ***
Repro
  Log Variables

It will show:

---------------------------------------------------------------------------
TestSuiteError:

Invalid dictionary variable item '{'1': 'IxServerTest', '4': 'UartTest', '23': 'FprogTest', '48': 'TECProxyTest', '119': 'IxIoTest', '129': 'L23Test', '208': 'PGIDIxAccumulatorTest'}'. Items must use 'name=value' syntax or be dictionary variables themselves.

Oddly enough, if I comment out the line containing the dictionary, and run, it will of course run without failure; but then if I uncomment the line and run again, it will work exactly once (and the dictionary will appear in the log). Then, if I run again, it will fail miserably.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal
$ cat /proc/version
Linux version 5.4.0-97-generic (buildd@lcy02-amd64-032) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #110-Ubuntu SMP Thu Jan 13 18:22:13 UTC 2022
$ conda --version
conda 4.11.0
$ conda list
# packages in environment at /home/fab/miniforge3/envs/xeus:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
anyio                     3.5.0           py310hff52083_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py310h6acc77f_1    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py310h6acc77f_1003    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
ca-certificates           2021.10.8            ha878542_0    conda-forge
certifi                   2021.10.8       py310hff52083_1    conda-forge
cffi                      1.15.0          py310h0fdd8cc_0    conda-forge
charset-normalizer        2.0.11             pyhd8ed1ab_0    conda-forge
cryptography              36.0.1          py310h685ca39_0    conda-forge
debugpy                   1.5.1           py310h122e73d_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
flit-core                 3.6.0              pyhd8ed1ab_0    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
fribidi                   1.0.10               h36c2ea0_0    conda-forge
giflib                    5.2.1                h36c2ea0_2    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.10.1          py310hff52083_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.8.0           py310hfdc917e_0    conda-forge
ipython                   7.31.1          py310hff52083_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.6.5              pyhd8ed1ab_0    conda-forge
jbig                      2.1               h7f98852_2003    conda-forge
jedi                      0.18.1          py310hff52083_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
jpeg                      9e                   h7f98852_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter_client            7.1.2              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.1           py310hff52083_1    conda-forge
jupyter_server            1.13.4             pyhd8ed1ab_0    conda-forge
jupyterlab                3.2.8              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_robotmode      0.3.1              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.10.3             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.0.2              pyhd8ed1ab_0    conda-forge
lcms2                     2.12                 hddcbb42_0    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
lerc                      3.0                  h9c3ff4c_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
libdeflate                1.8                  h7f98852_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 11.2.0              h1d223b6_12    conda-forge
libgomp                   11.2.0              h1d223b6_12    conda-forge
libimagequant             2.17.0               h7f98852_1    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libpng                    1.6.37               h21135ba_2    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libstdcxx-ng              11.2.0              he4da1e4_12    conda-forge
libtiff                   4.3.0                h6f004c6_2    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libwebp                   1.2.2                h3452ae3_0    conda-forge
libwebp-base              1.2.2                h7f98852_1    conda-forge
libxcb                    1.13              h7f98852_1004    conda-forge
libzlib                   1.2.11            h36c2ea0_1013    conda-forge
lunr                      0.6.1              pyh1d7be83_0    conda-forge
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
markupsafe                2.0.1           py310h6acc77f_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py310h6acc77f_1005    conda-forge
nbclassic                 0.3.5              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.10             pyhd8ed1ab_1    conda-forge
nbconvert                 6.4.1           py310hff52083_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
ncurses                   6.3                  h9c3ff4c_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
notebook                  6.4.8              pyha770c72_0    conda-forge
openjpeg                  2.4.0                hb52868f_1    conda-forge
openssl                   1.1.1l               h7f98852_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandoc                    2.17.1.1             ha770c72_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.0.0           py310h2f95282_0    conda-forge
pip                       22.0.3             pyhd8ed1ab_0    conda-forge
prometheus_client         0.13.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.26             pyha770c72_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.7              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1          py310h6acc77f_0    conda-forge
pysocks                   1.7.1           py310hff52083_4    conda-forge
python                    3.10.2          h85951f9_3_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pyzmq                     22.3.0          py310h675a958_1    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
robotframework            4.1.3              pyhd8ed1ab_0    conda-forge
robotframework-interpreter 0.7.5              pyhd8ed1ab_0    conda-forge
robotframework-lsp        0.14.0             pyhd8ed1ab_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                60.7.1          py310hff52083_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.2.0           py310hff52083_2    conda-forge
sqlite                    3.37.0               h9cd32fc_0    conda-forge
terminado                 0.13.1          py310hff52083_0    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h27826a3_1    conda-forge
tornado                   6.1             py310h6acc77f_2    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
urllib3                   1.26.8             pyhd8ed1ab_1    conda-forge
voila                     0.3.1              pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.2.3              pyhd8ed1ab_0    conda-forge
websockets                10.1            py310h6acc77f_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
widgetsnbextension        3.5.2           py310hff52083_1    conda-forge
xeus                      2.2.0                hab3612f_0    conda-forge
xeus-python               0.13.5          py310h8426450_1    conda-forge
xeus-python-shell         0.1.7              pyhd8ed1ab_0    conda-forge
xeus-robot                0.4.4           py310h8426450_0    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
zeromq                    4.3.4                h9c3ff4c_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_1    conda-forge
zlib                      1.2.11            h36c2ea0_1013    conda-forge
zstd                      1.5.2                ha95c52a_0    conda-forge