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

AttributeError occured when run eval_demo.py #13

Closed
w2kun opened this issue Oct 11, 2021 · 4 comments
Closed

AttributeError occured when run eval_demo.py #13

w2kun opened this issue Oct 11, 2021 · 4 comments

Comments

@w2kun
Copy link

w2kun commented Oct 11, 2021

Thanks for releasing the dataset!

I try to run eval_demo.py after installation but encounter an error. The details are as follows:

Traceback (most recent call last):
  File "F:/Github-Projects/co3d-master/eval_demo.py", line 209, in <module>
    main()
  File "F:/Github-Projects/co3d-master/eval_demo.py", line 56, in main
    category, task=task, single_sequence_id=single_sequence_id
  File "F:/Github-Projects/co3d-master/eval_demo.py", line 110, in evaluate_dbir_for_category
    test_restrict_sequence_id=single_sequence_id,
  File "F:\Github-Projects\co3d-master\dataset\dataset_zoo.py", line 182, in dataset_zoo
    datasets[dataset] = Co3dDataset(**params)
  File "<string>", line 29, in __init__
  File "F:\Github-Projects\co3d-master\dataset\co3d_dataset.py", line 287, in __post_init__
    self._load_frames()
  File "F:\Github-Projects\co3d-master\dataset\co3d_dataset.py", line 531, in _load_frames
    zipfile, List[types.FrameAnnotation]
  File "F:\Github-Projects\co3d-master\dataset\types.py", line 132, in load_dataclass
    return _dataclass_from_dict(asdict, cls)
  File "F:\Github-Projects\co3d-master\dataset\types.py", line 152, in _dataclass_from_dict
    types = typing.get_args(typeannot)
AttributeError: module 'typing' has no attribute 'get_args'

I'm using python 3.6.8, pytorch 1.7.1 and pytorch3d 0.5.0. Can you provide some advices on it? Thanks in advance.

@w2kun
Copy link
Author

w2kun commented Oct 11, 2021

I find in typing.pyi that get_args() only be defined when sys.version_info >= (3, 8). Is there an alternative of get_args() when using python < 3.8?

@bottler
Copy link

bottler commented Oct 11, 2021

Can you install the typing_extensions library? That makes up get_args for older Pythons and might do the trick.

@w2kun
Copy link
Author

w2kun commented Oct 13, 2021

Thanks for the advice. The get_args() in typing_extensions requires Python>=3.7, thus not suitable for Python3.6. It seems it is time to update my python or use anaconda.

@w2kun w2kun closed this as completed Oct 13, 2021
@curehabit
Copy link

typing_extensions

Python 3.7.11 also meets this ...

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