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

bpycv.render_data error #43

Open
liuyanqi opened this issue Jul 19, 2022 · 1 comment
Open

bpycv.render_data error #43

liuyanqi opened this issue Jul 19, 2022 · 1 comment

Comments

@liuyanqi
Copy link

liuyanqi commented Jul 19, 2022

There is an error with the random file name saved in /tmp/. Seems like the it was not able to generate the random filename.
I'm using blender 2.93 and python 3.9


Render image using: BLENDER_EEVEE
Saved: '/tmp/.png'
 Time: 00:00.18 (Saving: 00:00.00)

Traceback (most recent call last):
  File "/home/liuyanqi/spot/digit_new.blend/Text.002", line 225, in <module>
  File "/home/liuyanqi/spot/digit_new.blend/Text.002", line 144, in render_scene
  File "/home/liuyanqi/Downloads/blender-2.93.6-linux-x64/2.93/python/lib/python3.9/site-packages/bpycv/render_utils.py", line 110, in render_data
    render_result["image"] = _render_image()
  File "/home/liuyanqi/Downloads/blender-2.93.6-linux-x64/2.93/python/lib/python3.9/site-packages/bpycv/render_utils.py", line 90, in render_image
    image = imread(png_path)[..., :3]
  File "/home/liuyanqi/Downloads/blender-2.93.6-linux-x64/2.93/python/lib/python3.9/site-packages/boxx/ylimg/ylimgTool.py", line 46, in imread
    return imread(fname, as_grey, plugin, **plugin_args)
  File "/home/liuyanqi/Downloads/blender-2.93.6-linux-x64/2.93/python/lib/python3.9/site-packages/skimage/io/_io.py", line 48, in imread
    img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
  File "/home/liuyanqi/Downloads/blender-2.93.6-linux-x64/2.93/python/lib/python3.9/site-packages/skimage/io/manage_plugins.py", line 207, in call_plugin
    return func(*args, **kwargs)
  File "/home/liuyanqi/Downloads/blender-2.93.6-linux-x64/2.93/python/lib/python3.9/site-packages/skimage/io/_plugins/imageio_plugin.py", line 10, in imread
    return np.asarray(imageio_imread(*args, **kwargs))
  File "/home/liuyanqi/Downloads/blender-2.93.6-linux-x64/2.93/python/lib/python3.9/site-packages/imageio/core/functions.py", line 159, in imread
    with imopen(uri, "ri", plugin=format) as file:
  File "/home/liuyanqi/Downloads/blender-2.93.6-linux-x64/2.93/python/lib/python3.9/site-packages/imageio/core/imopen.py", line 137, in imopen
    request = Request(uri, io_mode)
  File "/home/liuyanqi/Downloads/blender-2.93.6-linux-x64/2.93/python/lib/python3.9/site-packages/imageio/core/request.py", line 245, in __init__
    self._parse_uri(uri)
  File "/home/liuyanqi/Downloads/blender-2.93.6-linux-x64/2.93/python/lib/python3.9/site-packages/imageio/core/request.py", line 383, in _parse_uri
    raise FileNotFoundError("No such file: '%s'" % fn)
FileNotFoundError: No such file: '/tmp/tmp93g8ifud.png'
Error: Python script failed, check the message in the system console

@DIYer22
Copy link
Owner

DIYer22 commented Jul 20, 2022

Looks like withattr(render, "filepath", png_path) in render_image dose not work, and image are saved to '/tmp/.png'

We have test bpycv on blender2.90, blender3.0 and blender3.1
You can try another blender version first.

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