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: 'str' object has no attribute 'read' #15

Open
MinchoU opened this issue Sep 7, 2022 · 0 comments
Open

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

MinchoU opened this issue Sep 7, 2022 · 0 comments

Comments

@MinchoU
Copy link

MinchoU commented Sep 7, 2022

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 :)

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

1 participant