Skip to content

The version of dask may need to be updated to be compatible with python 3.11.9. #386

@WhenMelancholy

Description

@WhenMelancholy

Describe the bug
While using the snakemake pipeline to process the example data, I encountered the following error ( I only took the the last section since the call stack is very deep)

    from dask.dataframe import methods                                                                                                                                       [90/1631]
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/site-packages/dask/dataframe/methods.py", line 34, in <module>                                                           
    from dask.dataframe.utils import is_dataframe_like, is_index_like, is_series_like                                                                                                 
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/site-packages/dask/dataframe/utils.py", line 20, in <module>                                                             
    from dask.dataframe import (  # noqa: F401 register pandas extension types                                                                                                        
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/site-packages/dask/dataframe/_dtypes.py", line 9, in <module>                                                            
    from dask.dataframe.extensions import make_array_nonempty, make_scalar                                                                                                            
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/site-packages/dask/dataframe/extensions.py", line 8, in <module>
    from dask.dataframe.accessor import (
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/site-packages/dask/dataframe/accessor.py", line 126, in <module>
    class DatetimeAccessor(Accessor):
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/site-packages/dask/dataframe/accessor.py", line 81, in __init_subclass__
    _bind_property(cls, pd_cls, attr, min_version)
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/site-packages/dask/dataframe/accessor.py", line 35, in _bind_property
    setattr(cls, attr, property(derived_from(pd_cls, version=min_version)(func)))
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/site-packages/dask/utils.py", line 987, in wrapper
    method.__doc__ = _derived_from(
                     ^^^^^^^^^^^^^^
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/site-packages/dask/utils.py", line 940, in _derived_from
    method_args = get_named_args(method)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/site-packages/dask/utils.py", line 701, in get_named_args
    s = inspect.signature(func)
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/inspect.py", line 3263, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/inspect.py", line 3011, in from_callable
    return _signature_from_callable(obj, sigcls=cls,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/inspect.py", line 2599, in _signature_from_callable
    call = _descriptor_get(call, obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/aiscuser/miniforge3/envs/scenic/lib/python3.11/inspect.py", line 2432, in _descriptor_get
    return get(descriptor, obj, type(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
"""

To Reproduce
Processing sample data using the snakemake pipeline.

Error output
See the Describe the bug section.

Expected behavior
No ValueError should be throwed.

Screenshots
N/A

Version (please complete the following information):

  • Python: Python 3.11
  • SCENIC+: commit 3f0e372
  • If a bug is related to another module: related to snakemake pipeline

Additional context
According to my investigation, this is due to an incompatibility between the dask and python versions. the version of dask used by scenicplus is incompatible with python 3.11.9 (issue here), but 3.11.9 is the latest python 3.11 release, which is used when creating conda environments as described in the README. So the dask version may need to be updated?

After updating the version of dask to 2024.05, this problem got solved.

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