obj import failure #57851

Closed
opened 2018-11-15 12:54:44 +01:00 by danny austin · 17 comments

System Information
Win 10 pro
GTX 980

Blender Version
2.8 b6ad300a13
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
crash

Traceback (most recent call last):

File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\__init__.py", line 145, in execute
  return import_obj.load(context, **keywords)
File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\import_obj.py", line 1146, in load
  use_image_search, float_func)
File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\import_obj.py", line 398, in create_materials
  context_material_name, img_data, line, 'Bump')
File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\import_obj.py", 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\import_obj.py", line 129, in _generic_tex_set
  nodetex.image = image

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

location: :-1

**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 crash Traceback (most recent call last): ``` File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\__init__.py", line 145, in execute return import_obj.load(context, **keywords) File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\import_obj.py", line 1146, in load use_image_search, float_func) File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\import_obj.py", line 398, in create_materials context_material_name, img_data, line, 'Bump') File "C:\Program Files\blender\2.80\scripts\addons\io_scene_obj\import_obj.py", 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\import_obj.py", line 129, in _generic_tex_set nodetex.image = image ``` AttributeError: 'NoneType' object has no attribute 'image' location: <unknown location>:-1
Author

Added subscriber: @danny.austin

Added subscriber: @danny.austin

Added subscriber: @brecht

Added subscriber: @brecht

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

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

Hi Brecht,

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

Hi Brecht, That is correct. Most obj files I have imported to 2.8 now work fine. Here's the offending obj.[Adidas2.obj](https://archive.blender.org/developer/F5568954/Adidas2.obj)
Author

This obj also produces the same error:
https://www.artec3d.com/3d-models/vw-bus

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

This obj also produces the same error: https://www.artec3d.com/3d-models/vw-bus when I export this obj from 3ds max as obj... it imports into blender correctly.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Philipp Oeser self-assigned this 2018-11-15 15:15:50 +01:00
Member

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...)

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...)
Author

Adidas2.mtl
Is this ok?

[Adidas2.mtl](https://archive.blender.org/developer/F5570539/Adidas2.mtl) Is this ok?
Philipp Oeser removed their assignment 2018-11-15 18:15:50 +01:00
Bastien Montagne was assigned by Philipp Oeser 2018-11-15 18:15:50 +01:00
Member

Added subscriber: @mont29

Added subscriber: @mont29
Member

I've commited blender/blender-addons@a0e769eeb3 and cfb6f14616 now.
These should fix the VW Bus.

For The Addidas [the original report]:
@danny.austin: 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...

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

I've commited blender/blender-addons@a0e769eeb3 and cfb6f14616 now. These should fix the VW Bus. For The Addidas [the original report]: @danny.austin: 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... @mont29: is this because of the lazy init? could you have a look?

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

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

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

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

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

Added subscriber: @MD.FahadHassan

Added subscriber: @MD.FahadHassan

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: 079c7f918c

(  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/__init__.py", 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/import_obj.py", line 1241, in load
    dataname,
  File "/home/production/Apps/Graphic_Apps/Blender_2.8/2.80/scripts/addons/io_scene_obj/import_obj.py", 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/import_obj.py", 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
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: `079c7f918c` ``` ( 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/__init__.py", 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/import_obj.py", line 1241, in load dataname, File "/home/production/Apps/Graphic_Apps/Blender_2.8/2.80/scripts/addons/io_scene_obj/import_obj.py", 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/import_obj.py", 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 ```

Sample
out.obj

Sample [out.obj](https://archive.blender.org/developer/F7084293/out.obj)

@MD.FahadHassan Please check recent reports first, and do not re-activate old ones like that… FYI, it's reported in #65326.

@MD.FahadHassan Please check recent reports first, and do not re-activate old ones like that… FYI, it's reported in #65326.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#57851
No description provided.