Page MenuHome

obj import failure
Closed, ResolvedPublic


System Information
Win 10 pro
GTX 980

Blender Version
2.8 b6ad300a13f
2018-11-12 9:09
Worked: (optional)

Short description of error
crash on obj import

Exact steps for others to reproduce the error
file>import obj
select file
click import

Traceback (most recent call last):

File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\", line 145, in execute
  return import_obj.load(context, **keywords)
File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\", line 1146, in load
  use_image_search, float_func)
File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\", line 398, in create_materials
  context_material_name, img_data, line, 'Bump')
File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\", line 156, in load_material_image
  _generic_tex_set(mat_wrap.normalmap_texture, image, 'UV', map_offset, map_scale)
File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\", line 129, in _generic_tex_set
  nodetex.image = image

AttributeError: 'NoneType' object has no attribute 'image'

location: <unknown location>:-1



Event Timeline

Brecht Van Lommel (brecht) triaged this task as Needs Information from User priority.

Please attach a .obj file to reproduce the problem, as I guess this does not happen with any file.

Hi Brecht,

That is correct. Most obj files I have imported to 2.8 now work fine. Here's the offending obj.

This obj also produces the same error:

when I export this obj from 3ds max as obj... it imports into blender correctly.

Philipp Oeser (lichtwerk) claimed this task.
Philipp Oeser (lichtwerk) raised the priority of this task from Needs Information from User to Confirmed, Medium.

Cannot reproduce with the Adidas2.obj alone.
Mind uploading the Adidas2.mtl as well?

Can confirm an error with the VW (but it is a different one...)

I've commited rBAa0e769eeb3603a30caf663c97f833f569e757b5f and rBcfb6f14616ecd96831815b48c7edfdd706ddcf2e now.
These should fix the VW Bus.

For The Addidas [the original report]:
@danny austin (dannysetvisions): there are probably imagemaps as well, but thats fine for now...

There is still something wrong with the ImageTexture/Normalmap node not being created in the Adidas case...

@Bastien Montagne (mont29): is this because of the lazy init? could you have a look?

Bastien Montagne (mont29) closed this task as Resolved.Nov 16 2018, 3:12 PM

Addidas file now imports OK, so think we can close that one.

Great work you guys!!! That was FAST

I've had a support ticket in with Autode$k for 3 months now... I still haven't heard anything. lol

Hi folks, it seems exporting from instant mesh gives this below error.
We can eliminate it by un-checking split by > Object | Group.
or using Keep vert order.
In Blender 2.79 checking those are working correctly.
In Blender 2.8 Before May 26, 2019 it was working correctly too. But after that it's broken.
Blender version : hash: rB079c7f918c81

(  0.0001 sec |   0.0001 sec) Importing OBJ '/home/production/Desktop/dsf.obj'...
  (  0.0006 sec |   0.0001 sec) Parsing OBJ file...
    (  0.0024 sec |   0.0010 sec) Done, loading materials and images...
    (  0.0031 sec |   0.0017 sec) Done, building geometries (verts:35 faces:23 materials: 1 smoothgroups:0) ...
Progress:  66.67%

Traceback (most recent call last):
  File "/home/production/Apps/Graphic_Apps/Blender_2.8/2.80/scripts/addons/io_scene_obj/", line 145, in execute
    return import_obj.load(context, **keywords)
  File "/home/production/Apps/Graphic_Apps/Blender_2.8/2.80/scripts/addons/io_scene_obj/", line 1241, in load
  File "/home/production/Apps/Graphic_Apps/Blender_2.8/2.80/scripts/addons/io_scene_obj/", line 689, in create_mesh
    faces_ma_index = tuple(material_mapping[context_material] for (_, _, _, context_material, _, _, _) in faces)
  File "/home/production/Apps/Graphic_Apps/Blender_2.8/2.80/scripts/addons/io_scene_obj/", line 689, in <genexpr>
    faces_ma_index = tuple(material_mapping[context_material] for (_, _, _, context_material, _, _, _) in faces)
KeyError: None

location: <unknown location>:-1

location: <unknown location>:-1

@Fahad Hasan (cgvirus) Please check recent reports first, and do not re-activate old ones like that… FYI, it's reported in T65326.