holoviz / datashader

Quickly and accurately render even the largest data.
http://datashader.org
BSD 3-Clause "New" or "Revised" License
3.31k stars 366 forks source link

Python 3.11+ E TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object #1358

Closed Zethson closed 1 month ago

Zethson commented 1 month ago

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc should be added within the dropdown below.)

Software Version Info ```plaintext Installed 62 packages in 112ms + anndata==0.10.9 + annotated-types==0.7.0 + array-api-compat==1.8 + certifi==2024.8.30 + charset-normalizer==3.3.2 + click==8.1.7 + cloudpickle==3.0.0 + colorcet==3.1.0 + consensusclustering==0.2.1 + contourpy==1.3.0 + cycler==0.12.1 + dask==2024.2.1 + datashader==0.16.3 + fcsparser==0.2.8 + flowutils==1.1.0 + fonttools==4.53.1 + fsspec==2024.9.0 + h5py==3.11.0 + idna==3.10 + importlib-metadata==8.5.0 + joblib==1.4.2 + kiwisolver==1.4.7 + kneed==0.8.5 + llvmlite==0.43.0 + locket==1.0.0 + matplotlib==3.9.2 + minisom==2.3.3 + multipledispatch==1.0.0 + natsort==8.4.0 + django==5.1.1 + fastobo==0.12.3 + gotrue==2.8.1 + graphviz==0.20.3 + h11==0.14.0 + h2==4.1.0 + hpack==4.0.0 + httpcore==0.17.3 + httpx==0.24.1 + hyperframe==6.0.1 + lamin-cli==0.17.4 + lamindb==0.76.8 + lamindb-setup==0.77.4 + lnschema-core==0.74.3 + markdown-it-py==3.0.0 + mdurl==0.1.2 + postgrest==0.13.2 + pronto==2.5.5 + psutil==6.0.0 + psycopg2-binary==2.9.9 + pydantic-settings==2.5.2 + pygments==2.18.0 + python-dotenv==1.0.1 + rapidfuzz==3.10.0 + realtime==1.0.6 + rich==13.8.1 + rich-click==1.8.3 - scipy==1.14.1 + scipy==1.12.0 + sniffio==1.3.1 + sqlparse==0.5.1 + storage3==0.7.7 + strenum==0.4.15 + supabase==2.2.1 + supafunc==0.3.3 + universal-pathlib==0.2.2 + websockets==12.0 + wetlab==0.33.0 ```

Description of expected behavior and the observed behavior

Complete, minimal, self-contained example code that reproduces the issue

import datashader

Stack traceback and/or browser JavaScript console output

----> 4 import datashader as ds
      5 import matplotlib.pyplot as plt
      6 import numpy as np

File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/datashader/__init__.py:9
      5 import param
      6 __version__ = str(param.version.Version(fpath=__file__, archive_commit="$Format:%h$",
      7                                         reponame="datashader"))
----> 9 from .core import Canvas                                 # noqa (API import)
     10 from .reductions import *                                # noqa (API import)
     11 from .glyphs import Point                                # noqa (API import)

File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/datashader/core.py:10
      8 import numpy as np
      9 import pandas as pd
---> 10 import dask.dataframe as dd
     11 import dask.array as da
     12 from packaging.version import Version
File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/inspect.py:3011, in Signature.from_callable(cls, obj, follow_wrapped, globals, locals, eval_str)
   3007 @classmethod
   3008 def from_callable(cls, obj, *,
   3009                   follow_wrapped=True, globals=None, locals=None, eval_str=False):
   3010     """Constructs Signature for the given callable object."""
-> 3011     return _signature_from_callable(obj, sigcls=cls,
   3012                                     follow_wrapper_chains=follow_wrapped,
   3013                                     globals=globals, locals=locals, eval_str=eval_str)

File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/inspect.py:2599, in _signature_from_callable(obj, follow_wrapper_chains, skip_bound_arg, globals, locals, eval_str, sigcls)
   2597     call = getattr_static(type(obj), '__call__', None)
   2598     if call is not None:
-> 2599         call = _descriptor_get(call, obj)
   2600         return _get_signature_of(call)
   2602 raise ValueError('callable {!r} is not supported by signature'.format(obj))

File /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/inspect.py:2432, in _descriptor_get(descriptor, obj)
   2430 if get is _sentinel:
   2431     return descriptor
-> 2432 return get(descriptor, obj, type(obj))

TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
Zethson commented 1 month ago

I guess this stems from https://github.com/dask/dask/issues/11038 actually and for some reason my dask version is slightly outdated.