IGR icon indicating copy to clipboard operation
IGR copied to clipboard

AttributeError: 'str' object has no attribute 'read'

Open MinchoU opened this issue 3 years ago • 0 comments

Hello. I'm trying to test reconstruction with stanford bunny which has extension of .xyz but faced an error. I'm currently using python 3.7.13, pytorch 1.2.0 on anaconda. When I ran a command

python reconstruction/run.py --eval --checkpoint CHECKPOINT

, I got an error message like

Traceback (most recent call last):
  File "reconstruction/run.py", line 344, in <module>
    eval=args.eval
  File "reconstruction/run.py", line 180, in __init__
    self.data = utils.load_point_cloud_by_file_extension(self.input_file)
  File "/home/user/surf_ws/src/IGR/code/utils/general.py", line 60, in load_point_cloud_by_file_extension
    point_set = torch.tensor(trimesh.load(file_name, ext).vertices).float()
  File "/home/user/anaconda3/envs/IGR/lib/python3.7/site-packages/trimesh/exchange/load.py", line 130, in load
    **kwargs)
  File "/home/user/anaconda3/envs/IGR/lib/python3.7/site-packages/trimesh/constants.py", line 153, in timed
    result = method(*args, **kwargs)
  File "/home/user/anaconda3/envs/IGR/lib/python3.7/site-packages/trimesh/exchange/load.py", line 212, in load_mesh
    **kwargs)
  File "/home/user/anaconda3/envs/IGR/lib/python3.7/site-packages/trimesh/exchange/xyz.py", line 27, in load_xyz
    raw = util.decode_text(file_obj.read()).strip()
AttributeError: 'str' object has no attribute 'read'

Can I get some help? Thanks :)

MinchoU avatar Sep 07 '22 08:09 MinchoU