flet-dev / examples

Flet sample applications
MIT License
433 stars 174 forks source link

cannot import flet: TypeError: unhashable type: 'list' #5

Closed basheerpaliyathu closed 1 year ago

basheerpaliyathu commented 2 years ago

just tried to start a new app, installed flet using pip pip install flet and then started flet by importing flet.

import flet

then the error poped out:

Traceback (most recent call last):
  File "/Users/admin/Documents/SampleScripts/todo.py", line 1, in <module>
    import flet
  File "/Users/admin/Documents/SampleScripts/venv/lib/python3.9/site-packages/flet/__init__.py", line 1, in <module>
    from flet.alert_dialog import AlertDialog
  File "/Users/admin/Documents/SampleScripts/venv/lib/python3.9/site-packages/flet/alert_dialog.py", line 3, in <module>
    from beartype import beartype
  File "/Users/admin/Documents/SampleScripts/venv/lib/python3.9/site-packages/beartype/__init__.py", line 59, in <module>
    from beartype._decor.main import beartype
  File "/Users/admin/Documents/SampleScripts/venv/lib/python3.9/site-packages/beartype/_decor/main.py", line 22, in <module>
    from beartype.typing import TYPE_CHECKING
  File "/Users/admin/Documents/SampleScripts/venv/lib/python3.9/site-packages/beartype/typing/__init__.py", line 329, in <module>
    from beartype.typing._typingpep544 import (
  File "/Users/admin/Documents/SampleScripts/venv/lib/python3.9/site-packages/beartype/typing/_typingpep544.py", line 35, in <module>
    from beartype._util.cache.utilcachecall import callable_cached
  File "/Users/admin/Documents/SampleScripts/venv/lib/python3.9/site-packages/beartype/_util/cache/utilcachecall.py", line 33, in <module>
    from beartype._util.func.arg.utilfuncargtest import (
  File "/Users/admin/Documents/SampleScripts/venv/lib/python3.9/site-packages/beartype/_util/func/arg/utilfuncargtest.py", line 16, in <module>
    from beartype._util.func.utilfunccodeobj import get_func_codeobj
  File "/Users/admin/Documents/SampleScripts/venv/lib/python3.9/site-packages/beartype/_util/func/utilfunccodeobj.py", line 19, in <module>
    from beartype._data.datatyping import Codeobjable, TypeException
  File "/Users/admin/Documents/SampleScripts/venv/lib/python3.9/site-packages/beartype/_data/datatyping.py", line 85, in <module>
    BeartypeReturn = Union[BeartypeableT, BeartypeConfedDecorator]
  File "/usr/local/Cellar/python@3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 262, in inner
    return func(*args, **kwds)
  File "/usr/local/Cellar/python@3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 339, in __getitem__
    return self._getitem(self, parameters)
  File "/usr/local/Cellar/python@3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 451, in Union
    parameters = _remove_dups_flatten(parameters)
  File "/usr/local/Cellar/python@3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 231, in _remove_dups_flatten
    return tuple(_deduplicate(params))
  File "/usr/local/Cellar/python@3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 205, in _deduplicate
    all_params = set(params)
TypeError: unhashable type: 'list'

any help?

mikaelho commented 1 year ago

Some questions:

FeodorFitsner commented 1 year ago

@basheerpaliyathu I'm closing this issue, but feel free to re-open this if it still occurs.