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: 'pybind11_type' object is not iterable #50

Open
sandeepnmenon opened this issue Jun 22, 2021 · 3 comments
Open

TypeError: 'pybind11_type' object is not iterable #50

sandeepnmenon opened this issue Jun 22, 2021 · 3 comments

Comments

@sandeepnmenon
Copy link

The following line is giving a syntax error

int_to_region_type = {m.value: m for m in ME.RegionType}

File "/home/SandeepMenon/SpatioTemporalSegmentation/main.py", line 28, in
from models import load_model, load_wrapper
File "/home/SandeepMenon/SpatioTemporalSegmentation/models/init.py", line 1, in
import models.resunet as resunet
File "/home/SandeepMenon/SpatioTemporalSegmentation/models/resunet.py", line 1, in
from models.resnet import ResNetBase, get_norm
File "/home/SandeepMenon/SpatioTemporalSegmentation/models/resnet.py", line 6, in
from models.modules.common import ConvType, NormType, get_norm, conv, sum_pool
File "/home/SandeepMenon/SpatioTemporalSegmentation/models/modules/common.py", line 61, in
int_to_region_type = {m.value: m for m in ME.RegionType}
TypeError: 'pybind11_type' object is not iterable

Environment details
Minkowski Engine : 0.5.4
PyTorch : 1.7.1

@sandeepnmenon
Copy link
Author

It can be replaced with
int_to_region_type = {m: ME.RegionType(m) for m in range(3)}
@chrischoy Is this fix relevant or is it due to MinkowskiEngine version mismatch.

@HaFred
Copy link

HaFred commented Dec 1, 2022

It can be replaced with int_to_region_type = {m: ME.RegionType(m) for m in range(3)} @chrischoy Is this fix relevant or is it due to MinkowskiEngine version mismatch.

Mostly the version mismatch, could you raise a pr for it? I guess this repository hasn't been updated for so long, and people nowadays using ME v0.5.4 naturally run into these problems...

@sandeepnmenon
Copy link
Author

I'll raise the PR. Thank you

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

2 participants