0
$\begingroup$

I am trying to export a simple shape: torus, sphere. the exported mesh is in OBJ format. Blender displays an error "location is unknown or something related to volume. If I increase the scale to 100 ( setting of OBJ export) still the error displayed. Do you have any idea why I cannot get the OBJ mesh?

Traceback (most recent call last):
    File "/Volumes/Blender/Blender.app/Contents/Resources/2.80/scripts/addons/io_scene_obj/__init__.py", line 311, in execute
        return export_obj.save(context, **keywords)
    File "/Volumes/Blender/Blender.app/Contents/Resources/2.80/scripts/addons/io_scene_obj/export_obj.py", line 791, in save
        EXPORT_PATH_MODE=path_mode,
    File "/Volumes/Blender/Blender.app/Contents/Resources/2.80/scripts/addons/io_scene_obj/export_obj.py", line 733, in _write
        progress,
    File "/Volumes/Blender/Blender.app/Contents/Resources/2.80/scripts/addons/io_scene_obj/export_obj.py", line 389, in write_file
        bpy.data.meshes.remove(me)
    RuntimeError: Error: Mesh 'sphere' is outside of main database and can not be removed from it

The link to the files:

The STL mesh: https://gofile.io/?c=iycaiS

Blender file:https://gofile.io/?c=yLi0Pp

enter image description here

$\endgroup$
  • 2
    $\begingroup$ Please edit your question and add the full error message. $\endgroup$ – Robert Gützkow Oct 8 at 16:46
  • $\begingroup$ I am attaching the error, I couldnot screen shot since the message disappear, so I attached as video. $\endgroup$ – Monika Oct 8 at 19:29
1
$\begingroup$

This issue appears when you're trying to export an object that contains no geometry, because of a single erroneous line in export_obj.py. This bug has already been reported and fixed in D5479 by Philipp Oeser. The fixed version of the exporter will be available in Blender 2.81.

In your case the object 'sphere' contains no geometry, which triggers this error. As a workaround until 2.81 is released you can either just select objects that contain geometry and enable Selection Only in the exporter or you could simply delete the problematic object. Alternatively you could also change the one line of code in the obj exporter yourself.

$\endgroup$
  • $\begingroup$ I am not sure, I do understand this answer. Actually I have tried different shapes, see the question I am adding more screen shot $\endgroup$ – Monika Oct 8 at 20:48
  • $\begingroup$ It's not about which shapes you've tried. There is an object named 'sphere' in your scene which contains no geometry and when you try to export the entire scene it causes the issue that you're describing. Delete the 'sphere' object (and all other objects that contain no geometry) and it will work properly. $\endgroup$ – Robert Gützkow Oct 8 at 20:53
  • $\begingroup$ I think you missed my point. I am trying to export the twisted yarn as in the description and it fails. I used spheres and other shapes to test. The question is how to make sure. that the object contains geometry? or any example would be appreciated. $\endgroup$ – Monika Oct 8 at 21:29
  • $\begingroup$ You can go through the objects in the outliner one by one and for each object switch into the edit mode. If there are no vertices, face or edges then it doesn't contain geometry. Perhaps you can upload your project and link it to your question so we can take a look: blend-exchange.giantcowfilms.com $\endgroup$ – Robert Gützkow Oct 8 at 22:17
  • $\begingroup$ For this mesh, it has vertice, faces, and edges, that's why I don't understand, why it doesn't export in OBJ format. I am attaching the links in the description. $\endgroup$ – Monika Oct 8 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.