Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

errorMessage: module 'typing' has no attribute _ClassVar | while running whispers on lambda python 3.9 #107

Open
bheemuni-raju opened this issue Apr 24, 2022 · 6 comments · Fixed by adeptex/whispers#36

Comments

@bheemuni-raju
Copy link

bheemuni-raju commented Apr 24, 2022

{
"errorMessage": "module 'typing' has no attribute '_ClassVar'",
"errorType": "AttributeError",
"requestId": "ac8561f5-dc64-42e5-af44-9f3c942ef80d",
"stackTrace": [
" File "/var/task/lambda_function.py", line 13, in lambda_handler\n for secret in whispers.secrets(args):\n",
" File "/opt/python/whispers/init.py", line 14, in secrets\n from whispers.core.args import parse_args\n",
" File "/opt/python/whispers/core/args.py", line 7, in \n from whispers.core.utils import DEFAULT_PATH, default_rules, load_regex\n",
" File "/opt/python/whispers/core/utils.py", line 12, in \n from whispers.models.pair import KeyValuePair\n",
" File "/opt/python/whispers/models/pair.py", line 6, in \n class KeyValuePair:\n",
" File "/opt/python/dataclasses.py", line 958, in dataclass\n return wrap(_cls)\n",
" File "/opt/python/dataclasses.py", line 950, in wrap\n return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)\n",
" File "/opt/python/dataclasses.py", line 800, in _process_class\n cls_fields = [_get_field(cls, name, type)\n",
" File "/opt/python/dataclasses.py", line 800, in \n cls_fields = [_get_field(cls, name, type)\n",
" File "/opt/python/dataclasses.py", line 659, in _get_field\n if (_is_classvar(a_type, typing)\n",
" File "/opt/python/dataclasses.py", line 550, in _is_classvar\n return type(a_type) is typing._ClassVar\n"
]
}

@adeptex
Copy link
Contributor

adeptex commented Apr 28, 2022

Hey @bheemuni-raju, thanks for raising! Which version of whispers are you using?

@bheemuni-raju
Copy link
Author

Hi @adeptex
I'm using whispers 2.0.5 version.

@bheemuni-raju
Copy link
Author

Hi @adeptex
Any update on this?

@adeptex
Copy link
Contributor

adeptex commented May 2, 2022

hey @bheemuni-raju, I think the problem is with having dataclasses installed. So short term fix is to pip3 uninstall dataclasses on Python 3.9.. but i have not yet done any testing.

Also FYI, this repo is for version 1. Version 2 is at https://github.com/adeptex/whispers, so the changes will be implemented there.

@adeptex
Copy link
Contributor

adeptex commented May 3, 2022

hi @bheemuni-raju did you try uninstalling dataclasses? Did it work for you?

@adeptex
Copy link
Contributor

adeptex commented May 12, 2022

hey @bheemuni-raju, this issue is addressed in 2.0.6 - https://github.com/adeptex/whispers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants