Skip to content

KeyError with set_index(col, npartitions="auto") when reading parquet #5893

Closed

Description

@WesRoach
import dask.dataframe as dd
import pandas as pd

df = pd.util.testing.makeMixedDataFrame()
ddf = dd.from_pandas(df, 2)

# Works: Setting Index on ddf in memory
ddf.set_index("C", npartitions="auto")

# Works: Reading from HDF & setting index
ddf.to_hdf("data.h5", key="/df", mode="w")
ddf = dd.read_hdf("data.h5", "/df")
ddf.set_index("C", npartitions="auto")

# Reading from Parquet & Setting Index
ddf = dd.from_pandas(df, 2)
ddf.to_parquet("test_data.parquet")
ddf = dd.read_parquet("test_data.parquet")

ddf.set_index("C", npartitions=1)  # Works
ddf.set_index("C")  # Works
ddf.set_index("C", npartitions="auto")  # KeyError

Activity

  1. mrocklin commented on Feb 16, 2020

    @mrocklin
    Member

    I apologize for the delay in response @WesRoach

    I tried your example (thank you for making a simple example) and it seems to work out ok for me

    In [1]: import dask.dataframe as dd 
       ...: import pandas as pd 
       ...:  
       ...: df = pd.util.testing.makeMixedDataFrame() 
       ...: ddf = dd.from_pandas(df, 2) 
       ...:  
       ...: # Works: Setting Index on ddf in memory 
       ...: ddf.set_index("C", npartitions="auto") 
       ...:  
       ...: # Reading from Parquet & Setting Index 
       ...: ddf = dd.from_pandas(df, 2) 
       ...: ddf.to_parquet("test_data.parquet") 
       ...: ddf = dd.read_parquet("test_data.parquet") 
       ...:  
       ...: ddf.set_index("C", npartitions=1)  # Works 
       ...: ddf.set_index("C")  # Works 
       ...: ddf.set_index("C", npartitions="auto")  # KeyError                                               
    Out[1]: 
    Dask DataFrame Structure:
                         A        B               D
    npartitions=2                                  
    foo1           float64  float64  datetime64[ns]
    foo4               ...      ...             ...
    foo5               ...      ...             ...
    Dask Name: sort_index, 8 tasks

    If you have time to provide a traceback that might help things. See https://blog.dask.org/2018/02/28/minimal-bug-reports

  2. WesRoach commented on Feb 17, 2020

    @WesRoach
    ContributorAuthor

    @mrocklin Thanks for taking a look!

    Traceback

    Details
    ---------------------------------------------------------------------------
    KeyError                                  Traceback (most recent call last)
    <ipython-input-1-f74773a3e6b9> in <module>
         20 ddf.set_index("C", npartitions=1)  # Works
         21 ddf.set_index("C")  # Works
    ---> 22 ddf.set_index("C", npartitions="auto")  # KeyError
    
    ~/.conda/envs/hcdev-latest/lib/python3.7/site-packages/dask/dataframe/core.py in set_index(***failed resolving arguments***)
       3555                 npartitions=npartitions,
       3556                 divisions=divisions,
    -> 3557                 **kwargs
       3558             )
       3559 
    
    ~/.conda/envs/hcdev-latest/lib/python3.7/site-packages/dask/dataframe/shuffle.py in set_index(df, index, npartitions, shuffle, compute, drop, upsample, divisions, partition_size, **kwargs)
         64     if divisions is None:
         65         if repartition:
    ---> 66             index2, df = base.optimize(index2, df)
         67             parts = df.to_delayed(optimize_graph=False)
         68             sizes = [delayed(sizeof)(part) for part in parts]
    
    ~/.conda/envs/hcdev-latest/lib/python3.7/site-packages/dask/base.py in optimize(*args, **kwargs)
        366         return args
        367 
    --> 368     dsk = collections_to_dsk(collections, **kwargs)
        369     postpersists = [
        370         a.__dask_postpersist__() if is_dask_collection(a) else (None, a) for a in args
    
    ~/.conda/envs/hcdev-latest/lib/python3.7/site-packages/dask/base.py in collections_to_dsk(collections, optimize_graph, **kwargs)
        217             *map(
        218                 ensure_dict,
    --> 219                 [opt(dsk, keys, **kwargs) for opt, (dsk, keys) in groups.items()],
        220             )
        221         )
    
    ~/.conda/envs/hcdev-latest/lib/python3.7/site-packages/dask/base.py in <listcomp>(.0)
        217             *map(
        218                 ensure_dict,
    --> 219                 [opt(dsk, keys, **kwargs) for opt, (dsk, keys) in groups.items()],
        220             )
        221         )
    
    ~/.conda/envs/hcdev-latest/lib/python3.7/site-packages/dask/dataframe/optimize.py in optimize(dsk, keys, **kwargs)
         21 
         22     if isinstance(keys, list):
    ---> 23         dsk, dependencies = cull(dsk, list(core.flatten(keys)))
         24     else:
         25         dsk, dependencies = cull(dsk, [keys])
    
    ~/.conda/envs/hcdev-latest/lib/python3.7/site-packages/dask/optimization.py in cull(dsk, keys)
         49         deps = [
         50             (k, get_dependencies(dsk, k, as_list=True))  # fuse needs lists
    ---> 51             for k in work
         52         ]
         53         dependencies.update(deps)
    
    ~/.conda/envs/hcdev-latest/lib/python3.7/site-packages/dask/optimization.py in <listcomp>(.0)
         49         deps = [
         50             (k, get_dependencies(dsk, k, as_list=True))  # fuse needs lists
    ---> 51             for k in work
         52         ]
         53         dependencies.update(deps)
    
    ~/.conda/envs/hcdev-latest/lib/python3.7/site-packages/dask/core.py in get_dependencies(dsk, key, task, as_list)
        185     """
        186     if key is not None:
    --> 187         arg = dsk[key]
        188     elif task is not no_default:
        189         arg = task
    
    KeyError: ('read-parquet-a2ab7bc7be12a8f455597b9bd8cb5f54', 0)

    conda list

    Details
    # packages in environment at /u02/users/wroach/.conda/envs/hcdev-latest:
    #
    # Name                    Version                   Build  Channel
    _libgcc_mutex             0.1                        main  
    _tflow_select             2.3.0                       mkl  
    absl-py                   0.9.0                    py37_0  
    ansiwrap                  0.8.4                      py_0    conda-forge
    appdirs                   1.4.3            py37h28b3542_0  
    arrow-cpp                 0.15.1           py37h248a92f_5  
    asn1crypto                1.3.0                    py37_0  
    aspy.yaml                 1.3.0                      py_0    conda-forge
    astor                     0.8.0                    py37_0  
    attrs                     19.3.0                     py_0  
    backcall                  0.1.0                    py37_0  
    backports                 1.0                        py_2  
    backports.tempfile        1.0                        py_1  
    backports.weakref         1.0.post1                  py_1  
    black                     19.3b0                     py_0  
    blas                      1.0                         mkl  
    bleach                    3.1.0                    py37_0  
    blosc                     1.16.3               hd408876_0    anaconda
    bokeh                     1.4.0                    py37_0  
    boost-cpp                 1.71.0               h7b6447c_0  
    brotli                    1.0.7                he6710b0_0  
    bzip2                     1.0.8                h7b6447c_0  
    c-ares                    1.15.0            h7b6447c_1001  
    ca-certificates           2020.1.1                      0    anaconda
    cairo                     1.14.12              h8948797_3  
    certifi                   2019.11.28               py37_0    anaconda
    cffi                      1.14.0           py37h2e261b9_0  
    cfgv                      3.0.0                      py_0    conda-forge
    chardet                   3.0.4                 py37_1003  
    click                     7.0                      py37_0  
    cloudpickle               1.3.0                      py_0  
    coverage                  5.0              py37h7b6447c_0  
    cryptography              2.8              py37h1ba5d50_0  
    cx_oracle                 7.2.3            py37h7b6447c_0  
    cycler                    0.10.0                   py37_0  
    cytoolz                   0.10.1           py37h7b6447c_0  
    dash                      1.4.1                      py_0  
    dash-core-components      1.3.1                      py_0  
    dash-html-components      1.0.1                      py_0  
    dash-renderer             1.1.2                      py_0  
    dash-table                4.4.1                      py_0  
    dask                      2.10.1                     py_0  
    dask-core                 2.10.1                     py_0  
    dbus                      1.13.12              h746ee38_0  
    decorator                 4.4.1                      py_0  
    defusedxml                0.6.0                      py_0  
    distributed               2.10.0                     py_0  
    double-conversion         3.1.5                he6710b0_1  
    editdistance              0.5.3            py37he1b5a44_0    conda-forge
    entrypoints               0.3                      py37_0  
    expat                     2.2.6                he6710b0_0  
    fastparquet               0.3.2            py37hdd07704_0  
    flake8                    3.7.9                    py37_0  
    flask                     1.1.1                      py_0  
    flask-compress            1.4.0                      py_0  
    fontconfig                2.13.0               h9420a91_0  
    freetype                  2.9.1                h8a8886c_1  
    fribidi                   1.0.5                h7b6447c_0  
    fsspec                    0.6.2                      py_0  
    future                    0.18.2                   py37_0  
    gast                      0.2.2                    py37_0  
    gflags                    2.2.2                he6710b0_0  
    glib                      2.63.1               h5a9c865_0  
    glog                      0.4.0                he6710b0_0  
    gmp                       6.1.2                h6c8ec71_1  
    google-pasta              0.1.8                      py_0  
    graphite2                 1.3.13               h23475e2_0  
    graphviz                  2.40.1               h21bd128_2  
    grpc-cpp                  1.26.0               hf8bcb03_0  
    grpcio                    1.16.1           py37hf8bcb03_1  
    gst-plugins-base          1.14.0               hbbd80ab_1  
    gstreamer                 1.14.0               hb453b48_1  
    h5py                      2.10.0           py37h7918eee_0  
    harfbuzz                  1.8.8                hffaf4a1_0  
    hcgen                     0.3.1                     dev_0    <develop>
    hdf5                      1.10.4               hb1b8bf9_0  
    heapdict                  1.0.1                      py_0  
    icu                       58.2                 h9c2bf20_1  
    identify                  1.4.11                     py_0    conda-forge
    idna                      2.8                      py37_0  
    importlib_metadata        1.5.0                    py37_0  
    intel-openmp              2020.0                      166  
    ipykernel                 5.1.4            py37h39e3cac_0  
    ipython                   7.12.0           py37h5ca1d4c_0  
    ipython_genutils          0.2.0                    py37_0  
    ipywidgets                7.5.1                      py_0  
    itsdangerous              1.1.0                    py37_0  
    jedi                      0.16.0                   py37_0  
    jinja2                    2.11.1                     py_0  
    joblib                    0.14.1                     py_0  
    jpeg                      9b                   h024ee3a_2  
    json5                     0.9.1                      py_0  
    jsonschema                3.2.0                    py37_0  
    jupyter                   1.0.0                    py37_7  
    jupyter_client            5.3.4                    py37_0  
    jupyter_console           6.1.0                      py_0  
    jupyter_contrib_core      0.3.3                      py_2    conda-forge
    jupyter_contrib_nbextensions 0.5.1                    py37_0    conda-forge
    jupyter_core              4.6.1                    py37_0  
    jupyter_highlight_selected_word 0.2.0                 py37_1000    conda-forge
    jupyter_latex_envs        1.4.4                 py37_1000    conda-forge
    jupyter_nbextensions_configurator 0.4.1                    py37_0    conda-forge
    jupyterlab                1.2.6              pyhf63ae98_0  
    jupyterlab_code_formatter 1.1.0                      py_0    conda-forge
    jupyterlab_server         1.0.6                      py_0  
    jupyterthemes             0.20.0                     py_0    conda-forge
    jupytext                  1.3.3                         0    conda-forge
    keras-applications        1.0.8                      py_0  
    keras-preprocessing       1.1.0                      py_1  
    kiwisolver                1.1.0            py37he6710b0_0  
    ld_impl_linux-64          2.33.1               h53a641e_7  
    lesscpy                   0.13.0                     py_1    conda-forge
    libboost                  1.71.0               h97c9712_0  
    libedit                   3.1.20181209         hc058e9b_0  
    libevent                  2.1.8                h1ba5d50_0  
    libffi                    3.2.1                hd88cf55_4  
    libgcc-ng                 9.1.0                hdf63c60_0  
    libgfortran-ng            7.3.0                hdf63c60_0  
    libpng                    1.6.37               hbc83047_0  
    libprotobuf               3.11.2               hd408876_0  
    libsodium                 1.0.16               h1bed415_0  
    libstdcxx-ng              9.1.0                hdf63c60_0  
    libtiff                   4.1.0                h2733197_0  
    libuuid                   1.0.3                h1bed415_2  
    libxcb                    1.13                 h1bed415_1  
    libxml2                   2.9.9                hea5a465_1  
    libxslt                   1.1.33               h7d1a2b0_0  
    llvmlite                  0.31.0           py37hd408876_0  
    locket                    0.2.0                    py37_1  
    lxml                      4.5.0            py37hefd8a0e_0  
    lz4-c                     1.8.1.2              h14c3975_0  
    lzo                       2.10                 h1bfc0ba_1    anaconda
    markdown                  3.1.1                    py37_0  
    markupsafe                1.1.1            py37h7b6447c_0  
    matplotlib                3.1.3                    py37_0  
    matplotlib-base           3.1.3            py37hef1b27d_0  
    mccabe                    0.6.1                    py37_1  
    mistune                   0.8.4            py37h7b6447c_0  
    mkl                       2020.0                      166  
    mkl-service               2.3.0            py37he904b0f_0  
    mkl_fft                   1.0.15           py37ha843d7b_0  
    mkl_random                1.1.0            py37hd6b4f25_0  
    mock                      4.0.1                      py_0    anaconda
    more-itertools            8.2.0                      py_0  
    msgpack-python            0.6.1            py37hfd86e86_1  
    mypy                      0.750                      py_0  
    mypy_extensions           0.4.1                    py37_0  
    nbconvert                 5.6.1                    py37_0  
    nbformat                  5.0.4                      py_0  
    ncurses                   6.1                  he6710b0_1  
    nodeenv                   1.3.5                      py_0    conda-forge
    nodejs                    10.13.0              he6710b0_0  
    notebook                  6.0.3                    py37_0  
    numba                     0.48.0           py37h0573a6f_0  
    numexpr                   2.7.1            py37h423224d_0  
    numpy                     1.18.1           py37h4f9e942_0  
    numpy-base                1.18.1           py37hde5b4d6_1  
    olefile                   0.46                     py37_0  
    openssl                   1.1.1                h7b6447c_0    anaconda
    opt_einsum                3.1.0                      py_0  
    packaging                 20.1                       py_0  
    pandas                    1.0.1            py37h0573a6f_0  
    pandoc                    2.2.3.2                       0  
    pandocfilters             1.4.2                    py37_1  
    pango                     1.42.4               h049681c_0  
    papermill                 1.2.1                    py37_0    conda-forge
    parso                     0.6.1                      py_0  
    partd                     1.1.0                      py_0  
    pcre                      8.43                 he6710b0_0  
    pexpect                   4.8.0                    py37_0  
    pickleshare               0.7.5                    py37_0  
    pillow                    7.0.0            py37hb39fc2d_0  
    pip                       20.0.2                   py37_1  
    pixman                    0.38.0               h7b6447c_0  
    plotly                    4.5.0                      py_0  
    pluggy                    0.13.1                   py37_0  
    ply                       3.11                     py37_0  
    pre-commit                2.0.1                    py37_0    conda-forge
    prometheus_client         0.7.1                      py_0  
    prompt_toolkit            3.0.3                      py_0  
    protobuf                  3.11.2           py37he6710b0_0  
    psutil                    5.6.7            py37h7b6447c_0  
    ptyprocess                0.6.0                    py37_0  
    py                        1.8.1                      py_0  
    py4j                      0.10.7                   py37_0  
    pyarrow                   0.15.1           py37h962f231_0  
    pycodestyle               2.5.0                    py37_0  
    pycparser                 2.19                     py37_0  
    pyflakes                  2.1.1                    py37_0  
    pygments                  2.5.2                      py_0  
    pyopenssl                 19.1.0                   py37_0  
    pyparsing                 2.4.6                      py_0  
    pyqt                      5.9.2            py37h05f1152_2  
    pyrsistent                0.15.7           py37h7b6447c_0  
    pysocks                   1.7.1                    py37_0  
    pyspark                   2.4.4                      py_0  
    pytables                  3.6.1            py37h71ec239_0    anaconda
    pytest                    5.3.5                    py37_0  
    pytest-cov                2.8.1                      py_0  
    python                    3.7.6                h0371630_2  
    python-dateutil           2.8.1                      py_0  
    python-dotenv             0.10.5                     py_0    conda-forge
    python-graphviz           0.13.2                     py_0  
    python-snappy             0.5.4            py37he6710b0_0  
    pytz                      2019.3                     py_0  
    pyyaml                    5.3              py37h7b6447c_0  
    pyzmq                     18.1.1           py37he6710b0_0  
    qt                        5.9.7                h5867ecd_1  
    qtconsole                 4.6.0                      py_1  
    re2                       2019.08.01           he6710b0_0  
    readline                  7.0                  h7b6447c_5  
    requests                  2.22.0                   py37_1  
    retrying                  1.3.3                    py37_2  
    scikit-learn              0.22.1           py37hd81dba3_0  
    scipy                     1.4.1            py37h0b6359f_0  
    seaborn                   0.10.0                     py_0  
    send2trash                1.5.0                    py37_0  
    setuptools                45.2.0                   py37_0  
    sip                       4.19.8           py37hf484d3e_0  
    six                       1.14.0                   py37_0  
    snappy                    1.1.7                hbae5bb6_3  
    sortedcontainers          2.1.0                    py37_0  
    sqlalchemy                1.3.13           py37h7b6447c_0  
    sqlite                    3.31.1               h7b6447c_0  
    tbb                       2020.0               hfd86e86_0  
    tblib                     1.6.0                      py_0  
    tenacity                  6.0.0                    py37_0  
    tensorboard               2.0.0              pyhb38c66f_1  
    tensorflow                2.0.0           mkl_py37h66b46cc_0  
    tensorflow-base           2.0.0           mkl_py37h9204916_0  
    tensorflow-estimator      2.0.0              pyh2649769_0  
    termcolor                 1.1.0                    py37_1  
    terminado                 0.8.3                    py37_0  
    testpath                  0.4.4                      py_0  
    textwrap3                 0.9.2                      py_0    conda-forge
    thrift                    0.11.0           py37hf484d3e_0  
    thrift-cpp                0.11.0               h02b749d_3  
    tk                        8.6.8                hbc83047_0  
    toml                      0.10.0           py37h28b3542_0  
    toolz                     0.10.0                     py_0  
    tornado                   6.0.3            py37h7b6447c_3  
    tqdm                      4.42.1                     py_0  
    traitlets                 4.3.3                    py37_0  
    typed-ast                 1.4.1            py37h7b6447c_0  
    typing_extensions         3.7.4.1                  py37_0  
    uriparser                 0.9.3                he6710b0_1  
    urllib3                   1.25.8                   py37_0  
    virtualenv                16.7.5                     py_0  
    wcwidth                   0.1.8                      py_0  
    webencodings              0.5.1                    py37_1  
    werkzeug                  0.16.1                     py_0  
    wheel                     0.34.2                   py37_0  
    widgetsnbextension        3.5.1                    py37_0  
    wrapt                     1.11.2           py37h7b6447c_0  
    xlrd                      1.2.0                    py37_0  
    xz                        5.2.4                h14c3975_4  
    yaml                      0.1.7                had09818_2  
    zeromq                    4.3.1                he6710b0_3  
    zict                      1.0.0                      py_0  
    zipp                      2.2.0                      py_0  
    zlib                      1.2.11               h7b6447c_3  
    zstd                      1.3.7                h0b5b093_0  

    conda list --explicit

    Details
    # This file may be used to create an environment using:
    # $ conda create --name <env> --file <this file>
    # platform: linux-64
    @EXPLICIT
    https://repo.anaconda.com/pkgs/main/linux-64/_libgcc_mutex-0.1-main.conda
    https://repo.anaconda.com/pkgs/main/linux-64/_tflow_select-2.3.0-mkl.conda
    https://repo.anaconda.com/pkgs/main/linux-64/blas-1.0-mkl.conda
    https://repo.anaconda.com/pkgs/main/linux-64/ca-certificates-2019.11.27-0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/intel-openmp-2019.4-243.conda
    https://repo.anaconda.com/pkgs/main/linux-64/ld_impl_linux-64-2.33.1-h53a641e_7.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libgfortran-ng-7.3.0-hdf63c60_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libstdcxx-ng-9.1.0-hdf63c60_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libgcc-ng-9.1.0-hdf63c60_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/mkl-2019.4-243.conda
    https://repo.anaconda.com/pkgs/main/linux-64/brotli-1.0.7-he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/bzip2-1.0.8-h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/c-ares-1.15.0-h7b6447c_1001.conda
    https://repo.anaconda.com/pkgs/main/linux-64/expat-2.2.6-he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/fribidi-1.0.5-h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/gflags-2.2.2-he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/gmp-6.1.2-h6c8ec71_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/graphite2-1.3.13-h23475e2_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/icu-58.2-h9c2bf20_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/jpeg-9b-h024ee3a_2.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libffi-3.2.1-hd88cf55_4.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libsodium-1.0.16-h1bed415_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libuuid-1.0.3-h1bed415_2.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libxcb-1.13-h1bed415_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/lz4-c-1.8.1.2-h14c3975_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/ncurses-6.1-he6710b0_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/nodejs-10.13.0-he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/openssl-1.1.1d-h7b6447c_3.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pcre-8.43-he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pixman-0.38.0-h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/re2-2019.08.01-he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/snappy-1.1.7-hbae5bb6_3.conda
    https://repo.anaconda.com/pkgs/main/linux-64/tbb-2019.8-hfd86e86_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/xz-5.2.4-h14c3975_4.conda
    https://repo.anaconda.com/pkgs/main/linux-64/yaml-0.1.7-had09818_2.conda
    https://repo.anaconda.com/pkgs/main/linux-64/zlib-1.2.11-h7b6447c_3.conda
    https://conda.anaconda.org/conda-forge/linux-64/boost-cpp-1.68.0-h11c811c_1000.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/dbus-1.13.12-h746ee38_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/glib-2.63.1-h5a9c865_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/glog-0.4.0-he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/gstreamer-1.14.0-hb453b48_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/hdf5-1.10.4-hb1b8bf9_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libedit-3.1.20181209-hc058e9b_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libpng-1.6.37-hbc83047_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libprotobuf-3.7.1-hd408876_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libtiff-4.0.9-he85c1e1_2.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libxml2-2.9.9-hea5a465_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pandoc-2.2.3.2-0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/readline-7.0-h7b6447c_5.conda
    https://repo.anaconda.com/pkgs/main/linux-64/tk-8.6.8-hbc83047_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/zeromq-4.3.1-he6710b0_3.conda
    https://repo.anaconda.com/pkgs/main/linux-64/zstd-1.3.3-h84994c4_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/freetype-2.9.1-h8a8886c_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/gst-plugins-base-1.14.0-hbbd80ab_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/libxslt-1.1.33-h7d1a2b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/sqlite-3.30.1-h7b6447c_0.conda
    https://conda.anaconda.org/conda-forge/linux-64/thrift-cpp-0.12.0-h0a07b25_1002.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/fontconfig-2.13.0-h9420a91_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/python-3.7.6-h0371630_2.conda
    https://repo.anaconda.com/pkgs/main/linux-64/appdirs-1.4.3-py37h28b3542_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/asn1crypto-1.3.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/astor-0.8.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/attrs-19.3.0-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/backcall-0.1.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/backports-1.0-py_2.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/cairo-1.14.12-h8948797_3.conda
    https://repo.anaconda.com/pkgs/main/linux-64/certifi-2019.11.28-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/chardet-3.0.4-py37_1003.conda
    https://repo.anaconda.com/pkgs/main/linux-64/click-7.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/cloudpickle-1.2.2-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/coverage-5.0-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/cx_oracle-7.2.3-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/dash-renderer-1.1.2-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/dask-core-2.10.0-py_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/decorator-4.4.1-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/defusedxml-0.6.0-py_0.tar.bz2
    https://conda.anaconda.org/conda-forge/linux-64/editdistance-0.5.3-py37he1b5a44_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/entrypoints-0.3-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/fsspec-0.6.2-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/future-0.18.2-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/gast-0.2.2-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/heapdict-1.0.1-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/idna-2.8-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/ipython_genutils-0.2.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/itsdangerous-1.1.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/json5-0.8.5-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/kiwisolver-1.1.0-py37he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/llvmlite-0.31.0-py37hd408876_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/locket-0.2.0-py37_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/lxml-4.4.2-py37hefd8a0e_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/markupsafe-1.1.1-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/mccabe-0.6.1-py37_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/mistune-0.8.4-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/more-itertools-8.0.2-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/msgpack-python-0.6.1-py37hfd86e86_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/mypy_extensions-0.4.1-py37_0.conda
    https://conda.anaconda.org/conda-forge/noarch/nodeenv-1.3.4-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/olefile-0.46-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pandocfilters-1.4.2-py37_1.conda
    https://repo.anaconda.com/pkgs/main/noarch/parso-0.6.0-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pickleshare-0.7.5-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/ply-3.11-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/prometheus_client-0.7.1-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/psutil-5.6.7-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/ptyprocess-0.6.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/py-1.8.1-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/py4j-0.10.7-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pycodestyle-2.5.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pycparser-2.19-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pyflakes-2.1.1-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/pyparsing-2.4.6-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pysocks-1.7.1-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/python-snappy-0.5.4-py37he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/pytz-2019.3-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/pyyaml-5.2-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pyzmq-18.1.0-py37he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/qt-5.9.7-h5867ecd_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/send2trash-1.5.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/sip-4.19.8-py37hf484d3e_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/six-1.14.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/sortedcontainers-2.1.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/sqlalchemy-1.3.13-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/tblib-1.6.0-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/termcolor-1.1.0-py37_1.conda
    https://repo.anaconda.com/pkgs/main/noarch/testpath-0.4.4-py_0.tar.bz2
    https://conda.anaconda.org/conda-forge/noarch/textwrap3-0.9.2-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/toml-0.10.0-py37h28b3542_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/toolz-0.10.0-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/tornado-6.0.3-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/tqdm-4.42.0-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/typed-ast-1.4.1-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/typing_extensions-3.7.4.1-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/virtualenv-16.7.5-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/wcwidth-0.1.7-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/webencodings-0.5.1-py37_1.conda
    https://repo.anaconda.com/pkgs/main/noarch/werkzeug-0.16.0-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/wrapt-1.11.2-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/xlrd-1.2.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/absl-py-0.8.1-py37_0.conda
    https://conda.anaconda.org/conda-forge/noarch/ansiwrap-0.8.4-py_0.tar.bz2
    https://conda.anaconda.org/conda-forge/noarch/aspy.yaml-1.3.0-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/backports.weakref-1.0.post1-py_1.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/black-19.3b0-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/cffi-1.13.2-py37h2e261b9_0.conda
    https://conda.anaconda.org/conda-forge/noarch/cfgv-2.0.1-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/cycler-0.10.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/cytoolz-0.10.1-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/google-pasta-0.1.8-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/harfbuzz-1.8.8-hffaf4a1_0.conda
    https://conda.anaconda.org/conda-forge/noarch/identify-1.4.11-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/jedi-0.16.0-py37_0.conda
    https://conda.anaconda.org/conda-forge/noarch/lesscpy-0.13.0-py_1.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/mkl-service-2.3.0-py37he904b0f_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/mypy-0.750-py_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/packaging-20.1-py_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/partd-1.1.0-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/pexpect-4.8.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pillow-5.4.1-py37h34e0f95_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/protobuf-3.7.1-py37he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pyqt-5.9.2-py37h05f1152_2.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pyrsistent-0.15.7-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/python-dateutil-2.8.1-py_0.tar.bz2
    https://conda.anaconda.org/conda-forge/noarch/python-dotenv-0.10.5-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/retrying-1.3.3-py37_2.conda
    https://repo.anaconda.com/pkgs/main/linux-64/setuptools-45.1.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/tenacity-6.0.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/terminado-0.8.3-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/thrift-0.11.0-py37hf484d3e_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/traitlets-4.3.3-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/zict-1.0.0-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/zipp-0.6.0-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/backports.tempfile-1.0-py_1.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/bleach-3.1.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/cryptography-2.8-py37h1ba5d50_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/distributed-2.10.0-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/flake8-3.7.9-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/grpcio-1.16.1-py37hf8bcb03_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/importlib_metadata-1.4.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/jinja2-2.10.3-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/joblib-0.14.1-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/jupyter_core-4.6.1-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/markdown-3.1.1-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/numpy-base-1.18.1-py37hde5b4d6_1.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pango-1.42.4-h049681c_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/plotly-4.4.1-py_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/pygments-2.5.2-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/wheel-0.33.6-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/flask-1.1.1-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/graphviz-2.40.1-h21bd128_2.conda
    https://repo.anaconda.com/pkgs/main/linux-64/jsonschema-3.2.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/jupyter_client-5.3.4-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pip-20.0.2-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pluggy-0.13.1-py37_0.conda
    https://conda.anaconda.org/conda-forge/linux-64/pre-commit-2.0.0-py37_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/prompt_toolkit-3.0.2-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/pyopenssl-19.1.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/flask-compress-1.4.0-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/ipython-7.11.1-py37h39e3cac_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/nbformat-5.0.4-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pytest-5.3.4-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/python-graphviz-0.13.2-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/urllib3-1.25.8-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/ipykernel-5.1.4-py37h39e3cac_0.conda
    https://conda.anaconda.org/conda-forge/noarch/jupytext-1.3.3-0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/nbconvert-5.6.1-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/pytest-cov-2.8.1-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/requests-2.22.0-py37_1.conda
    https://repo.anaconda.com/pkgs/main/noarch/jupyter_console-6.1.0-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/notebook-6.0.3-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/qtconsole-4.6.0-py_1.conda
    https://conda.anaconda.org/conda-forge/noarch/jupyter_contrib_core-0.3.3-py_2.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/jupyterlab_server-1.0.6-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/widgetsnbextension-3.5.1-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/ipywidgets-7.5.1-py_0.tar.bz2
    https://conda.anaconda.org/conda-forge/linux-64/jupyter_highlight_selected_word-0.2.0-py37_1000.tar.bz2
    https://conda.anaconda.org/conda-forge/linux-64/jupyter_latex_envs-1.4.4-py37_1000.tar.bz2
    https://conda.anaconda.org/conda-forge/linux-64/jupyter_nbextensions_configurator-0.4.1-py37_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/jupyterlab-1.2.5-pyhf63ae98_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/jupyter-1.0.0-py37_7.conda
    https://conda.anaconda.org/conda-forge/linux-64/jupyter_contrib_nbextensions-0.5.1-py37_0.tar.bz2
    https://conda.anaconda.org/conda-forge/noarch/jupyterlab_code_formatter-1.0.3-py_0.tar.bz2
    https://conda.anaconda.org/conda-forge/linux-64/arrow-cpp-0.13.0-py37h73cd1b8_1.tar.bz2
    https://conda.anaconda.org/conda-forge/noarch/jupyterthemes-0.20.0-py_0.tar.bz2
    https://conda.anaconda.org/conda-forge/linux-64/papermill-1.2.1-py37_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/bokeh-1.4.0-py37_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/dash-core-components-1.3.1-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/dash-html-components-1.0.1-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/dash-1.4.1-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/dash-table-4.4.1-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/h5py-2.10.0-py37h7918eee_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/keras-applications-1.0.8-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/matplotlib-3.1.1-py37h5429711_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/mkl_fft-1.0.15-py37ha843d7b_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/mkl_random-1.1.0-py37hd6b4f25_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/numpy-1.18.1-py37h4f9e942_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/numba-0.47.0-py37h962f231_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/opt_einsum-3.1.0-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/pandas-0.25.3-py37he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/scipy-1.3.2-py37h7c811a0_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/tensorboard-2.0.0-pyhb38c66f_1.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/dask-2.10.0-py_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/fastparquet-0.3.2-py37hdd07704_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/keras-preprocessing-1.1.0-py_1.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/patsy-0.5.1-py37_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/pyarrow-0.13.0-py37he6710b0_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/pyspark-2.4.4-py_0.tar.bz2
    https://repo.anaconda.com/pkgs/main/linux-64/scikit-learn-0.22.1-py37hd81dba3_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/statsmodels-0.11.0-py37h7b6447c_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/tensorflow-base-2.0.0-mkl_py37h9204916_0.conda
    https://repo.anaconda.com/pkgs/main/noarch/seaborn-0.9.0-pyh91ea838_1.tar.bz2
    https://repo.anaconda.com/pkgs/main/noarch/tensorflow-estimator-2.0.0-pyh2649769_0.conda
    https://repo.anaconda.com/pkgs/main/linux-64/tensorflow-2.0.0-mkl_py37h66b46cc_0.conda
  3. mrocklin commented on Feb 17, 2020

    @mrocklin
    Member

    Given that this seems to be an environment issue (we have different behavior in different environments) can I ask you to try this again in a minimal environment and then share that environment? Presumably this would be something like a very small conda environment.yaml file, or a simple conda create ... line.

  4. rileyschack commented on Feb 17, 2020

    @rileyschack

    Tested on Windows 10 with the following environment and getting the same KeyError as @WesRoach:

    conda create -n test-bug python=3.8 dask fastparquet ipython

    conda list

    Details
    > conda list
    # packages in environment at C:\bit9prog\dev\anaconda3\envs\test-bug:
    #
    # Name                    Version                   Build  Channel
    backcall                  0.1.0                      py_0    conda-forge
    bokeh                     1.4.0                    py38_0
    ca-certificates           2019.11.28           hecc5488_0    conda-forge
    certifi                   2019.11.28               py38_0    conda-forge
    click                     7.0                        py_0    conda-forge
    cloudpickle               1.3.0                      py_0    conda-forge
    colorama                  0.4.3                      py_0    conda-forge
    cytoolz                   0.10.1           py38hfa6e2cd_0    conda-forge
    dask                      2.10.1                     py_0    conda-forge
    dask-core                 2.10.1                     py_0    conda-forge
    decorator                 4.4.1                      py_0    conda-forge
    distributed               2.10.0                     py_0    conda-forge
    fastparquet               0.3.3            py38hc8d92b1_0    conda-forge
    freetype                  2.10.0               h563cfd7_1    conda-forge
    fsspec                    0.6.2                      py_0    conda-forge
    heapdict                  1.0.1                      py_0    conda-forge
    intel-openmp              2020.0                      166
    ipython                   7.12.0           py38h5ca1d4c_0    conda-forge
    ipython_genutils          0.2.0                      py_1    conda-forge
    jedi                      0.16.0                   py38_0    conda-forge
    jinja2                    2.11.1                     py_0    conda-forge
    jpeg                      9c                hfa6e2cd_1001    conda-forge
    libblas                   3.8.0                    14_mkl    conda-forge
    libcblas                  3.8.0                    14_mkl    conda-forge
    liblapack                 3.8.0                    14_mkl    conda-forge
    libpng                    1.6.37               h7602738_0    conda-forge
    libtiff                   4.1.0                h21b02b4_3    conda-forge
    llvmlite                  0.31.0                   py38_0    conda-forge
    locket                    0.2.0                      py_2    conda-forge
    lz4-c                     1.8.3             he025d50_1001    conda-forge
    markupsafe                1.1.1            py38hfa6e2cd_0    conda-forge
    mkl                       2019.4                      245
    msgpack-python            0.6.2            py38he980bc4_0    conda-forge
    numba                     0.48.0           py38he350917_0    conda-forge
    numpy                     1.18.1           py38hc71023c_0    conda-forge
    olefile                   0.46                       py_0    conda-forge
    openssl                   1.1.1d               hfa6e2cd_0    conda-forge
    packaging                 20.1                       py_0    conda-forge
    pandas                    1.0.1            py38he350917_0    conda-forge
    parso                     0.6.1                      py_0    conda-forge
    partd                     1.1.0                      py_0    conda-forge
    pickleshare               0.7.5                 py38_1000    conda-forge
    pillow                    7.0.0            py38h9ea1dd6_0    conda-forge
    pip                       20.0.2                     py_2    conda-forge
    prompt_toolkit            3.0.3                      py_0    conda-forge
    psutil                    5.6.7            py38hfa6e2cd_0    conda-forge
    pygments                  2.5.2                      py_0    conda-forge
    pyparsing                 2.4.6                      py_0    conda-forge
    python                    3.8.1                he1f5543_2    conda-forge
    python-dateutil           2.8.1                      py_0    conda-forge
    pytz                      2019.3                     py_0    conda-forge
    pyyaml                    5.3              py38hfa6e2cd_0    conda-forge
    setuptools                45.2.0                   py38_0    conda-forge
    six                       1.14.0                   py38_0    conda-forge
    sortedcontainers          2.1.0                      py_0    conda-forge
    sqlite                    3.30.1               hfa6e2cd_0    conda-forge
    tblib                     1.6.0                      py_0    conda-forge
    thrift                    0.11.0          py38h6538335_1001    conda-forge
    tk                        8.6.10               hfa6e2cd_0    conda-forge
    toolz                     0.10.0                     py_0    conda-forge
    tornado                   6.0.3            py38hfa6e2cd_4    conda-forge
    traitlets                 4.3.3                    py38_0    conda-forge
    vc                        14.1                 h0510ff6_4
    vs2015_runtime            14.16.27012          hf0eaf9b_1
    wcwidth                   0.1.8                      py_0    conda-forge
    wheel                     0.34.2                     py_1    conda-forge
    wincertstore              0.2                   py38_1003    conda-forge
    xz                        5.2.4             h2fa13f4_1001    conda-forge
    yaml                      0.2.2                hfa6e2cd_1    conda-forge
    zict                      1.0.0                      py_0    conda-forge
    zlib                      1.2.11            h2fa13f4_1006    conda-forge
    zstd                      1.4.4                hd8a0e53_1    conda-forge
    In [1]: import dask.dataframe as dd
       ...: import pandas as pd
       ...: 
       ...: df = pd.util.testing.makeMixedDataFrame()
       ...: ddf = dd.from_pandas(df, 2)
       ...: 
       ...: # Works: Setting Index on ddf in memory
       ...: ddf.set_index("C", npartitions="auto")
       ...: 
       ...: # Reading from Parquet & Setting Index
       ...: ddf = dd.from_pandas(df, 2)
       ...: ddf.to_parquet("test_data.parquet")
       ...: ddf = dd.read_parquet("test_data.parquet")
       ...: 
       ...: ddf.set_index("C", npartitions=1)  # Works
       ...: ddf.set_index("C")  # Works
       ...: ddf.set_index("C", npartitions="auto")  # KeyError

    Traceback

    Details
    ---------------------------------------------------------------------------
    KeyError                                  Traceback (most recent call last)
    <ipython-input-1-056ae696444b> in <module>
         15 ddf.set_index("C", npartitions=1)  # Works
         16 ddf.set_index("C")  # Works
    ---> 17 ddf.set_index("C", npartitions="auto")  # KeyError
    
    C:\bit9prog\dev\anaconda3\envs\test-bug\lib\site-packages\dask\dataframe\core.py in set_index(***failed resolving arguments***)
       3549             from .shuffle import set_index
       3550
    -> 3551             return set_index(
       3552                 self,
       3553                 other,
    
    C:\bit9prog\dev\anaconda3\envs\test-bug\lib\site-packages\dask\dataframe\shuffle.py in set_index(df, index, npartitions, shuffle, compute, drop, upsample, divisions, partition_size, **kwargs)
         64     if divisions is None:
         65         if repartition:
    ---> 66             index2, df = base.optimize(index2, df)
         67             parts = df.to_delayed(optimize_graph=False)
         68             sizes = [delayed(sizeof)(part) for part in parts]
    
    C:\bit9prog\dev\anaconda3\envs\test-bug\lib\site-packages\dask\base.py in optimize(*args, **kwargs)
        366         return args
        367
    --> 368     dsk = collections_to_dsk(collections, **kwargs)
        369     postpersists = [
        370         a.__dask_postpersist__() if is_dask_collection(a) else (None, a) for a in args
    
    C:\bit9prog\dev\anaconda3\envs\test-bug\lib\site-packages\dask\base.py in collections_to_dsk(collections, optimize_graph, **kwargs)
        217             *map(
        218                 ensure_dict,
    --> 219                 [opt(dsk, keys, **kwargs) for opt, (dsk, keys) in groups.items()],
        220             )
        221         )
    
    C:\bit9prog\dev\anaconda3\envs\test-bug\lib\site-packages\dask\base.py in <listcomp>(.0)
        217             *map(
        218                 ensure_dict,
    --> 219                 [opt(dsk, keys, **kwargs) for opt, (dsk, keys) in groups.items()],
        220             )
        221         )
    
    C:\bit9prog\dev\anaconda3\envs\test-bug\lib\site-packages\dask\dataframe\optimize.py in optimize(dsk, keys, **kwargs)
         21
         22     if isinstance(keys, list):
    ---> 23         dsk, dependencies = cull(dsk, list(core.flatten(keys)))
         24     else:
         25         dsk, dependencies = cull(dsk, [keys])
    
    C:\bit9prog\dev\anaconda3\envs\test-bug\lib\site-packages\dask\optimization.py in cull(dsk, keys)
         47         new_work = []
         48         out_keys += work
    ---> 49         deps = [
         50             (k, get_dependencies(dsk, k, as_list=True))  # fuse needs lists
         51             for k in work
    
    C:\bit9prog\dev\anaconda3\envs\test-bug\lib\site-packages\dask\optimization.py in <listcomp>(.0)
         48         out_keys += work
         49         deps = [
    ---> 50             (k, get_dependencies(dsk, k, as_list=True))  # fuse needs lists
         51             for k in work
         52         ]
    
    C:\bit9prog\dev\anaconda3\envs\test-bug\lib\site-packages\dask\core.py in get_dependencies(dsk, key, task, as_list)
        185     """
        186     if key is not None:
    --> 187         arg = dsk[key]
        188     elif task is not no_default:
        189         arg = task
    
    KeyError: ('read-parquet-a2ab7bc7be12a8f455597b9bd8cb5f54', 0)
  5. WesRoach commented on Feb 17, 2020

    @WesRoach
    ContributorAuthor

    Linux:

    conda create -n py37 python=3.7 dask fastparquet

    conda list

    Details
    # packages in environment at /u02/users/wroach/.conda/envs/py37:
    #
    # Name                    Version                   Build  Channel
    _libgcc_mutex             0.1                        main
    blas                      1.0                         mkl
    bokeh                     1.4.0                    py37_0
    ca-certificates           2020.1.1                      0
    certifi                   2019.11.28               py37_0
    click                     7.0                      py37_0
    cloudpickle               1.3.0                      py_0
    cytoolz                   0.10.1           py37h7b6447c_0
    dask                      2.10.1                     py_0
    dask-core                 2.10.1                     py_0
    distributed               2.10.0                     py_0
    fastparquet               0.3.2            py37hdd07704_0
    freetype                  2.9.1                h8a8886c_1
    fsspec                    0.6.2                      py_0
    heapdict                  1.0.1                      py_0
    intel-openmp              2020.0                      166
    jinja2                    2.11.1                     py_0
    jpeg                      9b                   h024ee3a_2
    ld_impl_linux-64          2.33.1               h53a641e_7
    libedit                   3.1.20181209         hc058e9b_0
    libffi                    3.2.1                hd88cf55_4
    libgcc-ng                 9.1.0                hdf63c60_0
    libgfortran-ng            7.3.0                hdf63c60_0
    libpng                    1.6.37               hbc83047_0
    libstdcxx-ng              9.1.0                hdf63c60_0
    libtiff                   4.1.0                h2733197_0
    llvmlite                  0.31.0           py37hd408876_0
    locket                    0.2.0                    py37_1
    markupsafe                1.1.1            py37h7b6447c_0
    mkl                       2020.0                      166
    mkl-service               2.3.0            py37he904b0f_0
    mkl_fft                   1.0.15           py37ha843d7b_0
    mkl_random                1.1.0            py37hd6b4f25_0
    msgpack-python            0.6.1            py37hfd86e86_1
    ncurses                   6.1                  he6710b0_1
    numba                     0.48.0           py37h0573a6f_0
    numpy                     1.18.1           py37h4f9e942_0
    numpy-base                1.18.1           py37hde5b4d6_1
    olefile                   0.46                     py37_0
    openssl                   1.1.1d               h7b6447c_4
    packaging                 20.1                       py_0
    pandas                    1.0.1            py37h0573a6f_0
    partd                     1.1.0                      py_0
    pillow                    7.0.0            py37hb39fc2d_0
    pip                       20.0.2                   py37_1
    psutil                    5.6.7            py37h7b6447c_0
    pyparsing                 2.4.6                      py_0
    python                    3.7.6                h0371630_2
    python-dateutil           2.8.1                      py_0
    pytz                      2019.3                     py_0
    pyyaml                    5.3              py37h7b6447c_0
    readline                  7.0                  h7b6447c_5
    setuptools                45.2.0                   py37_0
    six                       1.14.0                   py37_0
    sortedcontainers          2.1.0                    py37_0
    sqlite                    3.31.1               h7b6447c_0
    tbb                       2020.0               hfd86e86_0
    tblib                     1.6.0                      py_0
    thrift                    0.11.0           py37hf484d3e_0
    tk                        8.6.8                hbc83047_0
    toolz                     0.10.0                     py_0
    tornado                   6.0.3            py37h7b6447c_3
    wheel                     0.34.2                   py37_0
    xz                        5.2.4                h14c3975_4
    yaml                      0.1.7                had09818_2
    zict                      1.0.0                      py_0
    zlib                      1.2.11               h7b6447c_3
    zstd                      1.3.7                h0b5b093_0
    import dask.dataframe as dd
    import pandas as pd
    
    df = pd.util.testing.makeMixedDataFrame()
    ddf = dd.from_pandas(df, 2)
    
    ddf.to_parquet("test_data.parquet")
    /u02/users/wroach/.conda/envs/py37/lib/python3.7/site-packages/fastparquet/dataframe.py:5: FutureWarning: pandas.core.index is deprecated and will be removed in a future version.  The public classes are available in the top-level namespace.
      from pandas.core.index import CategoricalIndex, RangeIndex, Index, MultiIndex
    ddf = dd.read_parquet("test_data.parquet")
    
    ddf.set_index("C", npartitions="auto")  # KeyError

    Traceback

    Details
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/u02/users/wroach/.conda/envs/py37/lib/python3.7/site-packages/dask/dataframe/core.py", line 3557, in set_index
        **kwargs
      File "/u02/users/wroach/.conda/envs/py37/lib/python3.7/site-packages/dask/dataframe/shuffle.py", line 66, in set_index
        index2, df = base.optimize(index2, df)
      File "/u02/users/wroach/.conda/envs/py37/lib/python3.7/site-packages/dask/base.py", line 368, in optimize
        dsk = collections_to_dsk(collections, **kwargs)
      File "/u02/users/wroach/.conda/envs/py37/lib/python3.7/site-packages/dask/base.py", line 219, in collections_to_dsk
        [opt(dsk, keys, **kwargs) for opt, (dsk, keys) in groups.items()],
      File "/u02/users/wroach/.conda/envs/py37/lib/python3.7/site-packages/dask/base.py", line 219, in <listcomp>
        [opt(dsk, keys, **kwargs) for opt, (dsk, keys) in groups.items()],
      File "/u02/users/wroach/.conda/envs/py37/lib/python3.7/site-packages/dask/dataframe/optimize.py", line 23, in optimize
        dsk, dependencies = cull(dsk, list(core.flatten(keys)))
      File "/u02/users/wroach/.conda/envs/py37/lib/python3.7/site-packages/dask/optimization.py", line 51, in cull
        for k in work
      File "/u02/users/wroach/.conda/envs/py37/lib/python3.7/site-packages/dask/optimization.py", line 51, in <listcomp>
        for k in work
      File "/u02/users/wroach/.conda/envs/py37/lib/python3.7/site-packages/dask/core.py", line 187, in get_dependencies
        arg = dsk[key]
    KeyError: ('read-parquet-a2ab7bc7be12a8f455597b9bd8cb5f54', 1)
  6. mrocklin commented on Feb 18, 2020

    @mrocklin
    Member

    Thanks @WesRoach , that's quite helpful.

    cc @TomAugspurger , I could use your advice here. This is due to optimize_read_parquet_getitem. The keys that are passed in to optimize include the keys of the read_parquet operation itself. So, after it gets optimized/transformed those keys are no longer around, and so things fail. Here is a smaller reproducer:

    import dask.dataframe as dd
    import pandas as pd
    import dask
    
    df = pd.util.testing.makeMixedDataFrame()
    ddf = dd.from_pandas(df, 2)
    
    ddf.to_parquet("test_data.parquet")
    ddf = dd.read_parquet("test_data.parquet")
    
    dask.optimize(ddf.A, ddf)

    My sense here is that we should not optimize out the read_parquet + getitem layer if the layer is any of the output keys.

    Any thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions