ranahanocka / point2mesh

Reconstruct Watertight Meshes from Point Clouds [SIGGRAPH 2020]
MIT License
1.05k stars 121 forks source link

Problem with : in filename for #1

Open ctralie opened 4 years ago

ctralie commented 4 years ago

First of all, this is amazing work! So thank you for posting this code publicly.

I ran into a minor error when executing the code following your directions

  File "main.py", line 67, in <module>
    part_mesh.export(os.path.join(opts.save_path, f'recon_iter:{i}.obj'))
  File "/home/ctralie/code/point2mesh/models/layers/mesh.py", line 344, in export
    self.main_mesh.export(file)
  File "/home/ctralie/code/point2mesh/models/layers/mesh.py", line 225, in export
    export(file, vs, self.faces)
  File "/home/ctralie/code/point2mesh/utils.py", line 73, in export
    with open(file, 'w+') as f:
OSError: [Errno 22] Invalid argument: './checkpoints/giraffe/recon_iter:100.obj'

I don't know how general this is, but on my machine, Python does not appear to like the ":" in the filename. Once I changed this to a "_" (e.g. "recon_iter_300.obj" instead of "recon_iter:300.obj") on line 67 of main.py, the code worked beautifully.

ranahanocka commented 4 years ago

Hi @ctralie ,

Thanks for letting me know. I updated main.py to prevent others from having issues with this.