Coder Social home page Coder Social logo

Comments (5)

davidson-git avatar davidson-git commented on September 23, 2024 1

I get the same error in my 2.92.0 install using the 1.0.1 plugin. It doesn't happen on all files, I'm trying to do a bit of a binary check to see if there are any trends. Blender successfully creates a file in the filesystem but they're very small (less than 1kb) and aren't valid / throw an error trying to open in a viewer.

Stack trace from the error window included below:

Python: Traceback (most recent call last):
File "C:\Users\Davidson\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\io_mesh_3mf\export_3mf.py", line 117, in execute
self.write_objects(root, resources_element, blender_objects, global_scale)
File "C:\Users\Davidson\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\io_mesh_3mf\export_3mf.py", line 272, in write_objects
objectid, mesh_transformation = self.write_object_resource(resources_element, blender_object)
File "C:\Users\Davidson\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\io_mesh_3mf\export_3mf.py", line 312, in write_object_resource
metadata.retrieve(blender_object.data)
File "C:\Users\Davidson\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\io_mesh_3mf\metadata.py", line 174, in retrieve
for key in blender_object.keys():
AttributeError: 'NoneType' object has no attribute 'keys'

location: :-1

ETA: The first pattern that emerged was that I would get this error when trying to use the "Apply Modifiers" setting to blends that had unapplied modifiers. Blends/selections with no unapplied modifiers or using the plugin without this feature activated seemed to work fine. However, after I tried the workflow without setting this option, I am now no longer able to replicate the error.

from blender3mfformat.

davidson-git avatar davidson-git commented on September 23, 2024 1

According to my notes, I had the issue with this blend, trying to export the objects 'Slabs 4 Cleaned PreSplit.001' and 'Slabs 4 Cleaned PreSplit.002', but I can't confirm since the error no longer occurs.
Knife Handle Pivot 3 (Svord Mini Offset).zip

from blender3mfformat.

Ghostkeeper avatar Ghostkeeper commented on September 23, 2024

Hmm, is it possible to share the Blend file here, so that I can try to reproduce it? If that Blend file is not secret, that is.

Or otherwise, maybe you could show me the stack trace that pops up in a little window when you get the error. That would help a bit too.

There are 4 places in the export function where .keys() is being called (on what is supposed to be a Blender object, not None), but the only one that doesn't check for type immediately around it is in metadata.retrieve. That function should not be given None as input though. It's given bpy.context.scene, or the objects in context.selected_objects, or in context.scene.objects. A stack trace would tell which of these three it is. A Blend file would allow me to see exactly why.

from blender3mfformat.

Ghostkeeper avatar Ghostkeeper commented on September 23, 2024

@davidson-git Are you able to share a Blend file here that reproduces the issue then?

from blender3mfformat.

Ghostkeeper avatar Ghostkeeper commented on September 23, 2024

I think I found the issue here. Pretty subtle!

Key to the problem is this frame of the traceback:

File "C:\Users\Davidson\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\io_mesh_3mf\export_3mf.py", line 312, in write_object_resource
metadata.retrieve(blender_object.data)

The retrieve function expects a Blender object. Not the data of the Blender object. The data may be None. It should retrieve from the object itself, not its data.

That makes this a duplicate of #35. However this issue is already fixed, here: aa361ef

This fix is not in a release yet. I was trying to hold off on a release until Blender accepts or rejects the plug-in in their ticket. Maybe that wasn't such a good idea considering how long it's taking.

from blender3mfformat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.