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: object of type 'map' has no len() #24

Open
pmsmall opened this issue Apr 26, 2019 · 1 comment
Open

TypeError: object of type 'map' has no len() #24

pmsmall opened this issue Apr 26, 2019 · 1 comment

Comments

@pmsmall
Copy link

pmsmall commented Apr 26, 2019

File "/usr/local/lib/python3.5/dist-packages/pypcd/pypcd.py", line 736, in from_path
return point_cloud_from_path(fname)
File "/usr/local/lib/python3.5/dist-packages/pypcd/pypcd.py", line 303, in point_cloud_from_path
pc = point_cloud_from_fileobj(f)
File "/usr/local/lib/python3.5/dist-packages/pypcd/pypcd.py", line 296, in point_cloud_from_fileobj
return PointCloud(metadata, pc_data)
File "/usr/local/lib/python3.5/dist-packages/pypcd/pypcd.py", line 671, in init
self.check_sanity()
File "/usr/local/lib/python3.5/dist-packages/pypcd/pypcd.py", line 683, in check_sanity
assert(_metadata_is_consistent(md))
File "/usr/local/lib/python3.5/dist-packages/pypcd/pypcd.py", line 177, in _metadata_is_consistent
if not check(metadata):
File "/usr/local/lib/python3.5/dist-packages/pypcd/pypcd.py", line 162, in
checks.append((lambda m: len((m['type'])) == len((m['count'])) ==
TypeError: object of type 'map' has no len()

In python 3, map has no len()

162 checks.append((lambda m: len(m['type']) == len(m['count']) ==
163 len(m['fields']),

Add a list() to resolve the problems?

162 checks.append((lambda m: len(list(m['type'])) == len(list(m['count'])) ==
163 len(list(m['fields'])),

@DanielPollithy
Copy link

The python3 port is in pull request #9

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