Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'CoerceContext' object is not subscriptable #43

Open
xingpingdong opened this issue Feb 21, 2022 · 7 comments
Open

TypeError: 'CoerceContext' object is not subscriptable #43

xingpingdong opened this issue Feb 21, 2022 · 7 comments

Comments

@xingpingdong
Copy link

when I try to evaluate the default tracker NCC and run the following command

vot evaluate --workspace '/home/dxp/code/vot-test/workspace2' NCCPython
I got the following errors.

Traceback (most recent call last):
File "/home/dxp/anaconda3/envs/siamban/lib/python3.7/site-packages/vot/utilities/cli.py", line 388, in main
do_evaluate(args)
File "/home/dxp/anaconda3/envs/siamban/lib/python3.7/site-packages/vot/utilities/cli.py", line 159, in do_evaluate
workspace = Workspace.load(config.workspace)
File "/home/dxp/anaconda3/envs/siamban/lib/python3.7/site-packages/vot/workspace/init.py", line 138, in load
return Workspace(directory, **config)
File "/home/dxp/anaconda3/envs/siamban/lib/python3.7/site-packages/vot/workspace/init.py", line 150, in init
super().init(**kwargs)
File "/home/dxp/anaconda3/envs/siamban/lib/python3.7/site-packages/attributee/init.py", line 262, in init
value = afield.coerce(avalue, CoerceContext(parent=self))
File "/home/dxp/anaconda3/envs/siamban/lib/python3.7/site-packages/attributee/containers.py", line 134, in coerce
data = [self._contains.coerce(x, CoerceContext(parent=parent, key=i)) for i, x in enumerate(value)]
File "/home/dxp/anaconda3/envs/siamban/lib/python3.7/site-packages/attributee/containers.py", line 134, in
data = [self._contains.coerce(x, CoerceContext(parent=parent, key=i)) for i, x in enumerate(value)]
File "/home/dxp/anaconda3/envs/siamban/lib/python3.7/site-packages/attributee/primitives.py", line 104, in coerce
return self._transformer(to_string(value), ctx)
File "/home/dxp/anaconda3/envs/siamban/lib/python3.7/site-packages/vot/workspace/init.py", line 54, in
registry = List(String(transformer=lambda x, ctx: normalize_path(x, ctx["parent"].directory)))
TypeError: 'CoerceContext' object is not subscriptable

It seems a bug in the code. Could you help me?

@lukacu
Copy link
Collaborator

lukacu commented Feb 21, 2022

Yes, it seems that there are a few issues because the newest attributee library version is used. You can try to downgrade the library version, probably to 0.1.3 .

@xingpingdong
Copy link
Author

Thank you. I fixed it by setting attributtee==0.1.3.

@lukacu
Copy link
Collaborator

lukacu commented Feb 22, 2022

Well, it is not a fix, more of a workaround. I will reopen the issue and only close it once we fix it for the new version.

@lukacu lukacu reopened this Feb 22, 2022
@tahiira
Copy link

tahiira commented Mar 4, 2022

Yes, it seems that there are a few issues because the newest attributee library version is used. You can try to downgrade the library version, probably to 0.1.3 .

Hi,
I faced with this error, how can I downgrade vot-toolkit-python

@xingpingdong
Copy link
Author

Maybe you can try pip install attributtee==0.1.3

@tahiira
Copy link

tahiira commented Mar 5, 2022

Maybe you can try pip install attributtee==0.1.3

Thank you, but the error didnt resolve.
I use python3.6 with cuda 11.

@xingpingdong
Copy link
Author

xingpingdong commented Mar 5, 2022 via email

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

No branches or pull requests

3 participants