Python 3.5.2 has an issue, please replace with 3.5.3 #51415

Closed
opened 2017-05-04 16:46:10 +02:00 by Iso Sevens · 9 comments

System Information
Windows 7 SP1 64bit, NVidia GTX 580

Blender Version
Broken: 2.78c e92f235283
Worked: 2.76

Short description of error
Having Blender started by a web worker, (blender.exe -b -noaudio scene.blend) the following error is thrown:

Fatal Python error: Py_Initialize: can't initialize sys standard streams OSError: [WinError 6] The handle is invalid Current thread 0x00002f78 (most recent call first):

Exact steps for others to reproduce the error

  1. Using VisualStudio create an empty WebAPI application.
  2. Prepare a Blender Scene with the following script, allow autorun of scripts
    bpy.ops.render.render(write_still=True);
    sys.exit(0);
  3. On a GET request let it run Blender in a separate process and wait for it to finish rendering the scene (2.78 will dead-block, 2.76 will finish)
  4. Publish to IIS (do not use Visual Studio's internal IIS Express)
  5. Send the GET and see what happens

Due to a bug in Python 3.5.2 Blender will not even initialize and it will block the console with an error message. Make suer to redirect stderr properly to read the error (pasted above).

My solution was to replace the bundled Python with 3.5.3. I described it here: https://blender.stackexchange.com/questions/78259/blender-not-running-under-iis7

The problem was obviously introduced with Python 3.5 which was bundled since Blender 2.77. Fortunately Python 3.5.3 fixes it. I hope you will use 3.5.3 in the next Blender release :)

**System Information** Windows 7 SP1 64bit, NVidia GTX 580 **Blender Version** Broken: 2.78c e92f235283 Worked: 2.76 **Short description of error** Having Blender started by a web worker, (blender.exe -b -noaudio scene.blend) the following error is thrown: Fatal Python error: Py_Initialize: can't initialize sys standard streams OSError: [WinError 6] The handle is invalid Current thread 0x00002f78 (most recent call first): **Exact steps for others to reproduce the error** 1. Using VisualStudio create an empty WebAPI application. 2. Prepare a Blender Scene with the following script, allow autorun of scripts bpy.ops.render.render(write_still=True); sys.exit(0); 3. On a GET request let it run Blender in a separate process and wait for it to finish rendering the scene (2.78 will dead-block, 2.76 will finish) 4. Publish to IIS (do not use Visual Studio's internal IIS Express) 5. Send the GET and see what happens Due to a bug in Python 3.5.2 Blender will not even initialize and it will block the console with an error message. Make suer to redirect stderr properly to read the error (pasted above). My solution was to replace the bundled Python with 3.5.3. I described it here: https://blender.stackexchange.com/questions/78259/blender-not-running-under-iis7 The problem was obviously introduced with Python 3.5 which was bundled since Blender 2.77. Fortunately Python 3.5.3 fixes it. I hope you will use 3.5.3 in the next Blender release :)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @iso_7s

Added subscriber: @iso_7s
Member

Added subscribers: @ideasman42, @Sergey, @Blendify

Added subscribers: @ideasman42, @Sergey, @Blendify
Member

Sounds reasonable, for 2.8 we will use 3.6 but I guess we should update to 3.5.3 for 2.79.

Sounds reasonable, for 2.8 we will use 3.6 but I guess we should update to 3.5.3 for 2.79.

Added subscribers: @MartijnBerger, @jensverwiebe, @mont29

Added subscribers: @MartijnBerger, @jensverwiebe, @mont29

Even though this is rather exotic and corner case issue, am not totally opposed to the idea of updating our Python version, but that means we need platform maintainers available now - Windows and Linux should not be an issue, OSX is a bit more complicated these days. @jensverwiebe or @MartijnBerger , is one of you available to rebuild OSX python to 3.5.3 and upate the libs repo in coming week or so?

Even though this is rather exotic and corner case issue, am not totally opposed to the idea of updating our Python version, but that means we need platform maintainers available now - Windows and Linux should not be an issue, OSX is a bit more complicated these days. @jensverwiebe or @MartijnBerger , is one of you available to rebuild OSX python to 3.5.3 and upate the libs repo in coming week or so?

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Bastien Montagne self-assigned this 2017-05-19 07:48:44 +02:00

Finally we decided to update our python to 3.5.3, linux builds from the buildbot should already be updated now, other platforms will be in coming days. Considering the issue as fixed, thanks for the report.

Finally we decided to update our python to 3.5.3, linux builds from the buildbot should already be updated now, other platforms will be in coming days. Considering the issue as fixed, thanks for the report.
Author

Thank you very much for fixing :)

Thank you very much for fixing :)
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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-addons#51415
No description provided.