Log In
New Account
Home My Page Projects Blender 2.x BF release
Summary Activity Tracker SCM Files

Blender 2.6 Bug Tracker: Browse

[#22615] Opening a blend file in python (bpy.ops.wm.open_mainfile() (r29489)

Date:
2010-06-17 05:38
Priority:
3
State:
Closed
Submitted by:
Leif Andersen (leifandersen)
Assigned to:
Campbell Barton (campbellbarton)
Category:
Python
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
 
Summary:
Opening a blend file in python (bpy.ops.wm.open_mainfile() (r29489)
Detailed description
First, I would like to state that this may be related to bug #22557: https://projects.blender.org/tracker/index.php?func=detail&aid=22557&group_id=9&atid=498

Whenever I try to open a file from python, I get a segfault. More specifically, here is the output:
leif@leif-laptop:~$ ./blender-svn/official-build/bin/blender
found bundled python: /home/leif/blender-svn/official-build/bin/.blender/python
read blend: /home/leif/leif-blends/pawns.blend
Traceback (most recent call last):
File "/home/leif/blender-svn/official-build/bin/.blender/scripts/ui/space_console.py", line 130, in execute
return execute(context)
File "/home/leif/blender-svn/official-build/bin/.blender/scripts/op/console_python.py", line 144, in execute
bpy.ops.console.scrollback_append(text=sc.prompt + line, type='INPUT')
File "/home/leif/blender-svn/official-build/bin/.blender/scripts/modules/bpy/ops.py", line 158, in __call__
ret = op_call(self.idname_py(), C_dict, kw)
SystemError: Operator bpy.ops.console.scrollback_append.poll() failed, context is incorrect
Segmentation fault

I have uploaded a file that segfaults for me, in case not all files will do this.

So, to duplicate:
1. Download pawns.blend and put it in directory foo.
2. Start up blender, and go to the python console
3. In the console type: "bpy.ops.wm.open_mainfile(filepath="foo/pawns.blend")

Followup

Message
  • Date: 2010-11-12 19:18
  • Sender: Ton Roosendaal
  • Old report already, assigning to campbell so he has it listed :)
 

Attached Files:

Name Date Download
pawns.blend 2010-06-17 05:38 Download

Changes:

Field Old Value Date By
ResolutionInvestigate2010-11-18 17:34campbellbarton
close_date2010-11-18 17:342010-11-18 17:34campbellbarton
status_idOpen2010-11-18 17:34campbellbarton
ResolutionNone2010-11-12 19:18ton
assigned_tonone2010-11-12 19:18ton
File Added11485: pawns.blend2010-06-17 05:38leifandersen