Failed to create session: Textual column expression 'id' should be explicitly declared with text('id'), or use column('id') for more specificity

4,085 views
Skip to first unread message

Pei-Hsun Hsieh

unread,
Oct 2, 2021, 5:41:41 PM10/2/21
to oTree help & discussion
Hi Chris and everyone,

I got an error called "Failed to create session: Textual column expression 'id' should be explicitly declared with text('id'), or use column('id') for more specificity"

The detail is the following:
Traceback (most recent call last): File "c:\users\barry\anaconda3\lib\site-packages\otree\session.py", line 446, in create_session_traceback_wrapper return create_session(**kwargs) File "c:\users\barry\anaconda3\lib\site-packages\otree\session.py", line 349, in create_session dbq(Subsession) File "", line 2, in with_entities File "c:\users\barry\anaconda3\lib\site-packages\sqlalchemy\sql\base.py", line 104, in _generative x = fn(self, *args, **kw) File "c:\users\barry\anaconda3\lib\site-packages\sqlalchemy\orm\query.py", line 1448, in with_entities self._set_entities(entities) File "c:\users\barry\anaconda3\lib\site-packages\sqlalchemy\orm\query.py", line 187, in _set_entities self._raw_columns = [ File "c:\users\barry\anaconda3\lib\site-packages\sqlalchemy\orm\query.py", line 188, in coercions.expect( File "c:\users\barry\anaconda3\lib\site-packages\sqlalchemy\sql\coercions.py", line 187, in expect resolved = impl._literal_coercion( File "c:\users\barry\anaconda3\lib\site-packages\sqlalchemy\sql\coercions.py", line 388, in _literal_coercion return self._text_coercion(element, argname, **kw) File "c:\users\barry\anaconda3\lib\site-packages\sqlalchemy\sql\coercions.py", line 824, in _text_coercion raise exc.ArgumentError( sqlalchemy.exc.ArgumentError: Textual column expression 'id' should be explicitly declared with text('id'), or use column('id') for more specificity

I have updated all the packages. Does anyone know what's going on here?

Thanks!

Chris @ oTree

unread,
Oct 2, 2021, 6:39:28 PM10/2/21
to Pei-Hsun Hsieh, oTree help & discussion
I guess you have some model field named “id”….change its name. 

Sent from my phone

On Oct 2, 2021, at 3:14 PM, Pei-Hsun Hsieh <pei-hsu...@stonybrook.edu> wrote:


--
You received this message because you are subscribed to the Google Groups "oTree help & discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otree+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/otree/444d7e37-4cef-4d6d-94c0-7ddadce289fbn%40googlegroups.com.

Pei-Hsun Hsieh

unread,
Oct 2, 2021, 7:42:17 PM10/2/21
to oTree help & discussion
Hi Chris,

I did not have a model field name id, but I'm wondering if the issue came from the treatment assignment. I wanted to assign three group-level treatments, and in different group-level treatments, subjects would be assigned to different values. Is this way to assign treatment problematic?

def creating_session(subsession):
    LMR_group = itertools.cycle([0.50.81.1])
    # group-level treatment
    for group in subsession.get_groups():
        group.LMR = next(LMR_group)
        if group.LMR ==1.1:
            SMR_seq = [1.1,1.2,1.3,1.4,1.5,1.6,1.7]
        elif group.LMR ==0.8:
            SMR_seq = [0.8,1,1.2,1.4,1.6,1.8,2]
        elif group.LMR ==0.5:
            SMR_seq = [0.5,0.8,1.1,1.4,1.7,2,2.3]
        # player treatment in each group
        for player in group.get_players():
            player.SMR = SMR_seq[player.id_in_group-1]
            player.rule_order = random.choice([1,2])
            player.participant.is_dropout = False    

Chris @ oTree

unread,
Oct 2, 2021, 7:50:31 PM10/2/21
to oTree help & discussion
can you show your versions of all installed packages? with pip this would be "pip3 list" but i'm not sure how it's done with anaconda.

Pei-Hsun Hsieh

unread,
Oct 2, 2021, 7:53:57 PM10/2/21
to oTree help & discussion
I use anacond. The list is here.

# packages in environment at C:\Users\barry\anaconda3:
#
# Name                    Version                   Build  Channel
_anaconda_depends         2020.07                  py38_0
_ipyw_jlab_nb_ext_conf    0.1.0                    py38_0
abseil-cpp                20210324.2           h0e60522_0    conda-forge
aiofiles                  0.6.0                    pypi_0    pypi
alabaster                 0.7.12                     py_0    conda-forge
anaconda                  custom                   py38_1
anaconda-client           1.8.0              pyhd8ed1ab_0    conda-forge
anaconda-navigator        2.1.0            py38haa95532_0
anaconda-project          0.10.2             pyhd8ed1ab_0    conda-forge
anyio                     3.3.2            py38haa244fe_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
argh                      0.26.2          pyh9f0ad1d_1002    conda-forge
argon2-cffi               20.1.0           py38h294d835_2    conda-forge
arrow-cpp                 5.0.0           py38h9929e98_8_cpu    conda-forge
asgiref                   3.2.7                    pypi_0    pypi
asn1crypto                1.4.0              pyh9f0ad1d_0    conda-forge
astroid                   2.8.0            py38haa244fe_0    conda-forge
astropy                   4.3.1            py38h6f4d8f0_1    conda-forge
async_generator           1.10                       py_0    conda-forge
atomicwrites              1.4.0              pyh9f0ad1d_0    conda-forge
attrs                     21.2.0             pyhd8ed1ab_0    conda-forge
autopep8                  1.5.5              pyh44b312d_0    conda-forge
aws-c-cal                 0.5.11               he19cf47_0    conda-forge
aws-c-common              0.6.2                h8ffe710_0    conda-forge
aws-c-event-stream        0.2.7               h70e1b0c_13    conda-forge
aws-c-io                  0.10.5               h2fe331c_0    conda-forge
aws-checksums             0.1.11               h1e232aa_7    conda-forge
aws-sdk-cpp               1.8.186              hb0612c5_3    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
backports.shutil_get_terminal_size 1.0.0                      py_3    conda-forge
bcrypt                    3.2.0            py38h294d835_1    conda-forge
beautifulsoup4            4.10.0             pyha770c72_0    conda-forge
bitarray                  2.3.4            py38h294d835_0    conda-forge
bkcharts                  0.2                      py38_0
black                     20.8b1                   pypi_0    pypi
blas                      1.0                         mkl
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
blinker                   1.4                        py_1    conda-forge
blosc                     1.21.0               h0e60522_0    conda-forge
bokeh                     2.4.0            py38haa244fe_0    conda-forge
boto                      2.49.0                     py_0    conda-forge
bottleneck                1.3.2            py38h6f4d8f0_4    conda-forge
brotlipy                  0.7.0           py38h294d835_1001    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
c-ares                    1.17.2               h8ffe710_0    conda-forge
ca-certificates           2021.5.30            h5b45459_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
catalogue                 2.0.6            py38haa244fe_0    conda-forge
certifi                   2021.5.30        py38haa244fe_0    conda-forge
cffi                      1.14.6           py38hd8c33c5_1    conda-forge
cfitsio                   3.470                h0af3d06_7    conda-forge
chardet                   4.0.0            py38haa244fe_1    conda-forge
charls                    2.2.0                h39d44d4_0    conda-forge
charset-normalizer        2.0.0              pyhd8ed1ab_0    conda-forge
click                     8.0.1            py38haa244fe_0    conda-forge
cloudpickle               2.0.0              pyhd8ed1ab_0    conda-forge
clyent                    1.2.2                      py_1    conda-forge
colorama                  0.4.1                    pypi_0    pypi
comtypes                  1.1.10           py38haa244fe_0    conda-forge
conda                     4.10.3           py38haa244fe_2    conda-forge
conda-build               3.21.4           py38haa244fe_0    conda-forge
conda-content-trust       0.1.3              pyhd8ed1ab_0    conda-forge
conda-env                 2.6.0                         1    conda-forge
conda-pack                0.6.0              pyhd3deb0d_0    conda-forge
conda-package-handling    1.7.3            py38h31c79cd_0    conda-forge
conda-repo-cli            1.0.4              pyhd3eb1b0_0
conda-token               0.3.0              pyhd3eb1b0_0
conda-verify              3.1.1           py38haa244fe_1003    conda-forge
console_shortcut          0.1.1                         4
contextlib2               21.6.0             pyhd8ed1ab_0    conda-forge
cryptography              3.4.7            py38hd7da0ea_0    conda-forge
cudatoolkit               11.2.2               h933977f_8    conda-forge
cupy                      9.5.0            py38hf95616d_0    conda-forge
curl                      7.79.1               h789b8ee_1    conda-forge
cycler                    0.10.0                     py_2    conda-forge
cymem                     2.0.5            py38h885f38d_2    conda-forge
cython                    0.29.23          py38hd77b12b_0
cython-blis               0.7.4            py38h347fdf6_0    conda-forge
cytoolz                   0.11.0           py38h294d835_3    conda-forge
dask                      2021.9.1           pyhd8ed1ab_0    conda-forge
dask-core                 2021.9.1           pyhd8ed1ab_0    conda-forge
dataclasses               0.8                pyhc8e2a94_3    conda-forge
debugpy                   1.4.1            py38h885f38d_0    conda-forge
decorator                 4.4.2                      py_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
diff-match-patch          20200713           pyh9f0ad1d_0    conda-forge
distributed               2021.9.1         py38haa244fe_0    conda-forge
dj-database-url           0.5.0                    pypi_0    pypi
django                    2.2.12                   pypi_0    pypi
django-vanilla-views      1.0.6                    pypi_0    pypi
docutils                  0.17.1           py38haa244fe_0    conda-forge
emoji                     1.2.0                    pypi_0    pypi
en-core-web-sm            3.0.0                    pypi_0    pypi
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
et_xmlfile                1.0.1                   py_1001    conda-forge
fastcache                 1.1.0            py38h294d835_2    conda-forge
fastrlock                 0.6              py38h885f38d_1    conda-forge
filelock                  3.1.0              pyhd8ed1ab_1    conda-forge
flake8                    3.8.4                      py_0    conda-forge
flask                     2.0.1              pyhd8ed1ab_0    conda-forge
freetype                  2.10.4               h546665d_1    conda-forge
fsspec                    2021.10.0          pyhd8ed1ab_0    conda-forge
funcy                     1.16               pyhd8ed1ab_0    conda-forge
future                    0.18.2           py38haa244fe_3    conda-forge
gensim                    4.0.1            py38hd77b12b_0
get_terminal_size         1.0.0                h38e98db_0
gevent                    21.8.0           py38h294d835_0    conda-forge
gflags                    2.2.2             ha925a31_1004    conda-forge
giflib                    5.2.1                h8d14728_2    conda-forge
glob2                     0.7                        py_0    conda-forge
glog                      0.5.0                h4797de2_0    conda-forge
gmpy2                     2.1.0b5          py38hb63f22f_0    conda-forge
greenlet                  1.1.2            py38h885f38d_0    conda-forge
grpc-cpp                  1.40.0               h2431d41_1    conda-forge
h11                       0.12.0                   pypi_0    pypi
h2                        4.0.0                    pypi_0    pypi
h5py                      3.4.0           nompi_py38hde0384b_101    conda-forge
hdbscan                   0.8.27                   pypi_0    pypi
hdf5                      1.12.1          nompi_h2a0e4a3_100    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
helpdev                   0.7.1              pyhd8ed1ab_0    conda-forge
hpack                     4.0.0                    pypi_0    pypi
html5lib                  1.1                pyh9f0ad1d_0    conda-forge
hyperframe                6.0.0                    pypi_0    pypi
icc_rt                    2019.0.0             h0cc432a_1
icu                       68.1                 h0e60522_0    conda-forge
idna                      3.1                pyhd3deb0d_0    conda-forge
imagecodecs               2021.7.30        py38hc88f965_1    conda-forge
imageio                   2.9.0                      py_0    conda-forge
imagesize                 1.2.0                      py_0    conda-forge
importlib-metadata        4.8.1            py38haa244fe_0    conda-forge
importlib_metadata        4.8.1                hd8ed1ab_0    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
intel-openmp              2021.3.0          h57928b3_3372    conda-forge
intervaltree              3.0.2                      py_0    conda-forge
ipykernel                 6.4.1            py38h595d716_0    conda-forge
ipython                   7.28.0           py38h595d716_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.6.5              pyhd8ed1ab_0    conda-forge
isort                     5.9.3              pyhd8ed1ab_0    conda-forge
itsdangerous              1.1.0                    pypi_0    pypi
jdcal                     1.4.1                      py_0    conda-forge
jedi                      0.17.2           py38haa244fe_1    conda-forge
jinja2                    3.0.1              pyhd8ed1ab_0    conda-forge
joblib                    1.0.1              pyhd8ed1ab_0    conda-forge
jpeg                      9d                   h8ffe710_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.0.1              pyhd8ed1ab_0    conda-forge
jupyter                   1.0.0            py38haa244fe_6    conda-forge
jupyter_client            7.0.5              pyhd8ed1ab_0    conda-forge
jupyter_console           6.4.0              pyhd8ed1ab_0    conda-forge
jupyter_core              4.8.1            py38haa244fe_0    conda-forge
jupyter_server            1.11.0             pyhd8ed1ab_0    conda-forge
jupyterlab                3.1.14             pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.8.2              pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.0.2              pyhd8ed1ab_0    conda-forge
jxrlib                    1.1                  h8ffe710_2    conda-forge
keyring                   23.2.1           py38haa244fe_0    conda-forge
kiwisolver                1.3.2            py38hbd9d945_0    conda-forge
krb5                      1.19.2               hbae68bd_2    conda-forge
lazy-object-proxy         1.6.0            py38h294d835_0    conda-forge
lcms2                     2.12                 h2a16943_0    conda-forge
lerc                      2.2.1                h0e60522_0    conda-forge
libaec                    1.0.6                h39d44d4_0    conda-forge
libarchive                3.5.2                hb45042f_1    conda-forge
libblas                   3.9.0              11_win64_mkl    conda-forge
libbrotlicommon           1.0.9                h8ffe710_5    conda-forge
libbrotlidec              1.0.9                h8ffe710_5    conda-forge
libbrotlienc              1.0.9                h8ffe710_5    conda-forge
libcblas                  3.9.0              11_win64_mkl    conda-forge
libclang                  11.1.0          default_h5c34c98_1    conda-forge
libcurl                   7.79.1               h789b8ee_1    conda-forge
libdeflate                1.8                  h8ffe710_0    conda-forge
libiconv                  1.16                 he774522_0    conda-forge
liblapack                 3.9.0              11_win64_mkl    conda-forge
liblief                   0.11.5               h0e60522_0    conda-forge
libllvm9                  9.0.1           default_hcbf89dc_4    conda-forge
libpng                    1.6.37               h1d00b33_2    conda-forge
libprotobuf               3.18.0               h7755175_1    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libspatialindex           1.9.3                h39d44d4_4    conda-forge
libssh2                   1.10.0               h680486a_2    conda-forge
libthrift                 0.15.0               h636ae23_0    conda-forge
libtiff                   4.3.0                h0c97f57_0    conda-forge
libutf8proc               2.6.1                hcb41399_0    conda-forge
libwebp-base              1.2.1                h8ffe710_0    conda-forge
libxml2                   2.9.12               hf5bbc77_0    conda-forge
libxslt                   1.1.33               h65864e5_2    conda-forge
libzlib                   1.2.11            h8ffe710_1012    conda-forge
libzopfli                 1.0.3                h0e60522_0    conda-forge
llvmlite                  0.37.0           py38h57a6900_0    conda-forge
locket                    0.2.0                      py_2    conda-forge
lxml                      4.6.3            py38h292cb97_0    conda-forge
lz4-c                     1.9.3                h8ffe710_1    conda-forge
lzo                       2.10              he774522_1000    conda-forge
m2-msys2-runtime          2.5.0.17080.65c939c               3    conda-forge
m2-patch                  2.7.5                         2    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
markupsafe                1.1.1                    pypi_0    pypi
matplotlib                3.4.3            py38haa244fe_1    conda-forge
matplotlib-base           3.4.3            py38h1f000d6_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
menuinst                  1.4.18           py38haa244fe_0    conda-forge
mistune                   0.8.4           py38h294d835_1004    conda-forge
mkl                       2021.3.0           hb70f87d_564    conda-forge
mkl-service               2.4.0            py38h294d835_0    conda-forge
mkl_fft                   1.3.0            py38h277e83a_2
mkl_random                1.2.2            py38h60cbd38_0    conda-forge
mock                      4.0.3            py38haa244fe_1    conda-forge
modin                     0.11.0           py38haa244fe_0    conda-forge
modin-core                0.11.0           py38haa244fe_0    conda-forge
modin-dask                0.11.0           py38haa244fe_0    conda-forge
more-itertools            8.10.0             pyhd8ed1ab_0    conda-forge
mpc                       1.2.1                h54e1faf_0    conda-forge
mpfr                      4.1.0                h8d14728_1    conda-forge
mpir                      3.0.0             he025d50_1002    conda-forge
mpmath                    1.2.1              pyhd8ed1ab_0    conda-forge
msgpack-python            1.0.2            py38hbd9d945_1    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
multipledispatch          0.6.0                      py_0    conda-forge
murmurhash                1.0.5            py38h885f38d_0    conda-forge
mypy_extensions           0.4.3            py38haa244fe_3    conda-forge
mysql-connector-python    8.0.26                   pypi_0    pypi
navigator-updater         0.2.1                    py38_0
nbclassic                 0.3.2              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.4              pyhd8ed1ab_0    conda-forge
nbconvert                 6.2.0            py38haa244fe_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
networkx                  2.6.3              pyhd8ed1ab_0    conda-forge
nltk                      3.6.4              pyhd8ed1ab_0    conda-forge
nose                      1.3.7                   py_1006    conda-forge
notebook                  6.4.4              pyha770c72_0    conda-forge
nrclex                    3.0.0                    pypi_0    pypi
numba                     0.54.0           py38h5858985_0    conda-forge
numexpr                   2.7.3            py38h4c96930_0    conda-forge
numpy                     1.20.3           py38ha4e8547_0
numpy-base                1.20.3           py38hc2deb75_0
numpydoc                  1.1.0                      py_1    conda-forge
oauthlib                  3.1.1              pyhd8ed1ab_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.4.0                hb211442_1    conda-forge
openpyxl                  3.0.9              pyhd8ed1ab_0    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
otree                     5.3.1                    pypi_0    pypi
packaging                 21.0               pyhd8ed1ab_0    conda-forge
pandas                    1.3.3            py38h5d928e2_0    conda-forge
pandoc                    2.14.2               h8ffe710_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
paramiko                  2.7.2              pyh9f0ad1d_0    conda-forge
parquet-cpp               1.5.1                         2    conda-forge
parso                     0.7.0                      py_0
partd                     1.2.0              pyhd8ed1ab_0    conda-forge
path                      16.2.0           py38haa244fe_0    conda-forge
path.py                   12.5.0                        0    conda-forge
pathlib2                  2.3.6            py38haa244fe_0    conda-forge
pathspec                  0.9.0              pyhd8ed1ab_0    conda-forge
pathtools                 0.1.2                      py_1    conda-forge
pathy                     0.6.0              pyhd8ed1ab_0    conda-forge
patsy                     0.5.2              pyhd8ed1ab_0    conda-forge
pep8                      1.7.1                      py_0    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    8.3.2            py38h794f750_0    conda-forge
pip                       21.2.4             pyhd8ed1ab_0    conda-forge
pkginfo                   1.7.1              pyhd8ed1ab_0    conda-forge
platformdirs              2.3.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.0.0            py38haa244fe_1    conda-forge
ply                       3.11                       py_1    conda-forge
pooch                     1.5.1              pyhd8ed1ab_0    conda-forge
powershell_shortcut       0.0.1                         3
preshed                   3.0.5            py38h885f38d_1    conda-forge
priority                  1.3.0                    pypi_0    pypi
prometheus_client         0.11.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.20             pyha770c72_0    conda-forge
prompt_toolkit            3.0.20               hd8ed1ab_0    conda-forge
psutil                    5.8.0            py38h294d835_1    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
py                        1.10.0             pyhd3deb0d_0    conda-forge
py-lief                   0.11.5           py38h885f38d_0    conda-forge
py4j                      0.10.9             pyh9f0ad1d_0    conda-forge
pyarrow                   5.0.0           py38h9f6c39d_8_cpu    conda-forge
pycodestyle               2.6.0              pyh9f0ad1d_0    conda-forge
pycosat                   0.6.3           py38h294d835_1006    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pycurl                    7.44.1           py38hdf897c8_0    conda-forge
pydantic                  1.8.2            py38h294d835_0    conda-forge
pydocstyle                6.1.1              pyhd8ed1ab_0    conda-forge
pyerfa                    2.0.0            py38hcb5f9af_0    conda-forge
pyflakes                  2.2.0              pyh9f0ad1d_0    conda-forge
pygments                  2.10.0             pyhd8ed1ab_0    conda-forge
pyjwt                     2.1.0              pyhd8ed1ab_0    conda-forge
pyldavis                  3.3.1              pyhd8ed1ab_0    conda-forge
pylint                    2.11.1             pyhd8ed1ab_0    conda-forge
pyls-black                0.4.6              pyh9f0ad1d_0    conda-forge
pyls-spyder               0.3.2              pyhd3eb1b0_0
pynacl                    1.4.0            py38h31c79cd_2    conda-forge
pynndescent               0.5.2                    pypi_0    pypi
pyodbc                    4.0.32           py38h885f38d_0    conda-forge
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyqt                      5.12.3           py38haa244fe_7    conda-forge
pyqt-impl                 5.12.3           py38h885f38d_7    conda-forge
pyqt5-sip                 4.19.18          py38h885f38d_7    conda-forge
pyqtchart                 5.12             py38h885f38d_7    conda-forge
pyqtwebengine             5.12.1           py38h885f38d_7    conda-forge
pyreadline                2.1             py38haa244fe_1004    conda-forge
pyrfc3339                 1.1                      pypi_0    pypi
pyrsistent                0.17.3           py38h294d835_2    conda-forge
pysocks                   1.7.1            py38haa244fe_3    conda-forge
pyspark                   3.1.2              pyh6c4a22f_0    conda-forge
pytables                  3.6.1            py38h7deab4d_4    conda-forge
pytest                    6.2.5            py38haa244fe_0    conda-forge
python                    3.8.12          h7840368_1_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-jsonrpc-server     0.4.0              pyh9f0ad1d_0    conda-forge
python-language-server    0.36.2             pyhd8ed1ab_0    conda-forge
python-libarchive-c       3.1              py38haa244fe_0    conda-forge
python-multipart          0.0.5                    pypi_0    pypi
python_abi                3.8                      2_cp38    conda-forge
pytz                      2019.2                   pypi_0    pypi
pywavelets                1.1.1            py38h6f4d8f0_3    conda-forge
pywin32                   301              py38h294d835_0    conda-forge
pywin32-ctypes            0.2.0           py38haa244fe_1003    conda-forge
pywinpty                  1.1.4            py38hd3f51b4_0    conda-forge
pyyaml                    5.4.1            py38h294d835_1    conda-forge
pyzmq                     22.3.0           py38h09162b1_0    conda-forge
qdarkstyle                2.8.1              pyhd8ed1ab_2    conda-forge
qt                        5.12.9               h5909a2a_4    conda-forge
qtawesome                 1.0.3              pyhd8ed1ab_0    conda-forge
qtconsole                 5.1.1              pyhd8ed1ab_0    conda-forge
qtpy                      1.11.2             pyhd8ed1ab_0    conda-forge
re2                       2021.09.01           h0e60522_0    conda-forge
regex                     2021.9.30        py38h294d835_0    conda-forge
requests                  2.26.0             pyhd8ed1ab_0    conda-forge
requests-oauthlib         1.3.0              pyh9f0ad1d_0    conda-forge
requests-unixsocket       0.2.0                      py_0    conda-forge
reverse_geocoder          1.5.1              pyhd8ed1ab_0    conda-forge
ripgrep                   13.0.0               h7f3b576_1    conda-forge
rope                      0.20.1             pyhd8ed1ab_0    conda-forge
rtree                     0.9.7            py38h8b54edf_2    conda-forge
ruamel_yaml               0.15.80         py38h294d835_1004    conda-forge
scikit-image              0.18.3           py38h5d928e2_0    conda-forge
scikit-learn              1.0              py38h8224a6f_1    conda-forge
scipy                     1.7.1            py38ha1292f7_0    conda-forge
seaborn                   0.11.2               hd8ed1ab_0    conda-forge
seaborn-base              0.11.2             pyhd8ed1ab_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                58.0.4           py38haa244fe_2    conda-forge
shellingham               1.4.0              pyh44b312d_0    conda-forge
simplegeneric             0.8.1                      py_1    conda-forge
singledispatch            3.6.1              pyh44b312d_0    conda-forge
sip                       4.19.25          py38h885f38d_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
smart_open                5.2.1              pyhd8ed1ab_0    conda-forge
snappy                    1.1.8                ha925a31_3    conda-forge
sniffio                   1.2.0            py38haa244fe_1    conda-forge
snowballstemmer           2.1.0              pyhd8ed1ab_0    conda-forge
snscrape                  0.3.5.dev91+gfdc33d0          pypi_0    pypi
sortedcollections         2.1.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.0.1                      py_1    conda-forge
spacy                     3.1.3            py38he5193b3_0    conda-forge
spacy-legacy              3.0.8              pyhd8ed1ab_0    conda-forge
sphinx                    4.2.0              pyh6c4a22f_0    conda-forge
sphinxcontrib             1.0                      py38_1
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_0    conda-forge
sphinxcontrib-websupport  1.2.4              pyh9f0ad1d_0    conda-forge
spyder                    4.2.5            py38haa244fe_0    conda-forge
spyder-kernels            1.10.2           py38haa95532_0
sqlalchemy                1.3.22                   pypi_0    pypi
sqlite                    3.36.0               h8ffe710_2    conda-forge
sqlparse                  0.4.1                    pypi_0    pypi
srsly                     2.4.1            py38h885f38d_0    conda-forge
starlette                 0.14.1                   pypi_0    pypi
statsmodels               0.12.2           py38h6f4d8f0_0    conda-forge
sympy                     1.8              py38haa244fe_0    conda-forge
tbb                       2021.3.0             h2d74725_0    conda-forge
tblib                     1.7.0              pyhd8ed1ab_0    conda-forge
termcolor                 1.1.0                    pypi_0    pypi
terminado                 0.12.1           py38haa244fe_0    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
text2emotion              0.0.5                    pypi_0    pypi
textblob                  0.15.3                   pypi_0    pypi
textdistance              4.2.1              pyhd8ed1ab_0    conda-forge
thinc                     8.0.10           py38he5193b3_1    conda-forge
threadpoolctl             3.0.0              pyh8a188c0_0    conda-forge
three-merge               0.1.1              pyh9f0ad1d_0    conda-forge
tifffile                  2021.8.30          pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     1.2.1              pyhd8ed1ab_0    conda-forge
toolz                     0.11.1                     py_0    conda-forge
top2vec                   1.0.24                   pypi_0    pypi
tornado                   6.1              py38h294d835_1    conda-forge
tqdm                      4.62.3             pyhd8ed1ab_0    conda-forge
traitlets                 5.1.0              pyhd8ed1ab_0    conda-forge
tweepy                    4.0.0a0                  pypi_0    pypi
typed-ast                 1.4.3            py38h294d835_0    conda-forge
typer                     0.4.0              pyhd8ed1ab_0    conda-forge
typing-extensions         3.10.0.2             hd8ed1ab_0    conda-forge
typing_extensions         3.10.0.2           pyha770c72_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
ujson                     4.2.0            py38h885f38d_0    conda-forge
umap-learn                0.5.1                    pypi_0    pypi
unicodecsv                0.14.1                     py_1    conda-forge
urllib3                   1.26.7             pyhd8ed1ab_0    conda-forge
uvicorn                   0.13.4                   pypi_0    pypi
vc                        14.2                 hb210afc_5    conda-forge
vs2015_runtime            14.29.30037          h902a5da_5    conda-forge
wasabi                    0.8.2              pyh44b312d_0    conda-forge
watchdog                  1.0.2            py38haa95532_1
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          0.57.0           py38haa244fe_4    conda-forge
websockets                8.1                      pypi_0    pypi
werkzeug                  2.0.1              pyhd8ed1ab_0    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
whitenoise                4.1.3                    pypi_0    pypi
widgetsnbextension        3.5.1            py38haa244fe_4    conda-forge
win_inet_pton             1.1.0            py38haa244fe_2    conda-forge
win_unicode_console       0.5             py38h32f6830_1001    conda-forge
wincertstore              0.2             py38haa244fe_1006    conda-forge
winpty                    0.4.3                         4    conda-forge
wordcloud                 1.8.1                    pypi_0    pypi
wrapt                     1.12.1           py38h294d835_3    conda-forge
wsproto                   1.0.0                    pypi_0    pypi
wtforms                   2.3.3                    pypi_0    pypi
wtforms-sqlalchemy        0.2                      pypi_0    pypi
xlrd                      2.0.1              pyhd8ed1ab_3    conda-forge
xlsxwriter                3.0.1              pyhd8ed1ab_0    conda-forge
xlwings                   0.24.9           py38haa244fe_0    conda-forge
xlwt                      1.3.0                      py_1    conda-forge
xmltodict                 0.12.0                     py_0    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
yaml                      0.2.5                he774522_0    conda-forge
yapf                      0.31.0             pyhd8ed1ab_0    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zfp                       0.5.5                h0e60522_7    conda-forge
zict                      2.0.0                      py_0    conda-forge
zipp                      3.5.1              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h8ffe710_1012    conda-forge
zope                      1.0                      py38_1
zope.event                4.5.0              pyh9f0ad1d_0    conda-forge
zope.interface            5.4.0            py38h294d835_0    conda-forge
zstd                      1.5.0                h6255e5f_0    conda-forge

Chris @ oTree

unread,
Oct 2, 2021, 7:54:31 PM10/2/21
to oTree help & discussion
By the way, you should not update all packages individually, because otree doesn't use the latest version of SQLAlchemy for example. just install otree and it will install the correct versions of other packages.

Chris @ oTree

unread,
Oct 2, 2021, 7:57:21 PM10/2/21
to oTree help & discussion
can you run 'otree zip' and send me your project as an .otreezip?

Chris @ oTree

unread,
Oct 2, 2021, 8:00:02 PM10/2/21
to oTree help & discussion
it looks like the correct version of sqlalchemy but i'm still suspicious...see this thread: https://groups.google.com/g/otree/c/5Xf3XnY_Lk0/m/uDmYEFGoCAAJ
that user had the same error as you and it seems to be caused by the wrong version of sqlalchemy.

Chris @ oTree

unread,
Oct 2, 2021, 9:25:42 PM10/2/21
to oTree help & discussion
The code in your traceback refers to sqlalchemy/sql/coercions.py, which doesn't exist in sqlalchemy 1.3.22. Therefore I think you have the wrong version installed.

Pei-Hsun Hsieh

unread,
Oct 2, 2021, 10:10:13 PM10/2/21
to oTree help & discussion
It seems the real version of sqlalchemy on my machine is 1.4.25.  It works after I downgraded it to 1.3.22. Thank you for your help, Chris.

Chris @ oTree 在 2021年10月2日 星期六下午9:25:42 [UTC-4] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages