OSL not working in 2.79 RC1 #52358

Closed
opened 2017-08-11 18:36:59 +02:00 by Miguel Porces · 14 comments

System Information
Windows 10

Blender Version
Broken: 2.79 RC1 5e9132b
Worked: 2.78c

Short description of error
Python produces an «'ImportError: cannot import name '_remove_dead_weakref'», when choosing an osl script from the scriipt node

Exact steps for others to reproduce the error
Start Blender, choose Cycles, turn on OSL. Create a material for the default cube with an Osl script in it (any script will produce the same, even the templates from blender).
The script will not compile and the error will show in the console and in the InfoSpace.

**System Information** Windows 10 **Blender Version** Broken: 2.79 RC1 5e9132b Worked: 2.78c **Short description of error** Python produces an «'ImportError: cannot import name '_remove_dead_weakref'», when choosing an osl script from the scriipt node **Exact steps for others to reproduce the error** Start Blender, choose Cycles, turn on OSL. Create a material for the default cube with an Osl script in it (any script will produce the same, even the templates from blender). The script will not compile and the error will show in the console and in the InfoSpace.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Secrop

Added subscriber: @Secrop
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

I'm unable to reproduce on windows7/x64, what os are you on? does it work when you start blender with --factory-startup ?

I'm unable to reproduce on windows7/x64, what os are you on? does it work when you start blender with --factory-startup ?
Author

It seems a python problem. I'm using Windows10/x64 and this is the output of the error with factory settings:

found bundled python: C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\importlib\__init__.py", line 57, in <module>
    import types
  File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\types.py", line 166, in <module>
    import functools as _functools
  File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\functools.py", line 23, in <module>
    from weakref import WeakKeyDictionary
  File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\weakref.py", line 12, in <module>
    from _weakref import (
ImportError: cannot import name '_remove_dead_weakref'

During handling of the above exception, another exception occurred:

SystemError: <built-in function register> returned a result with an error set
Traceback (most recent call last):
  File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\scripts\addons\cycles\__init__.py", line 101, in update_script_node
    osl.update_script_node(node, self.report)
  File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\scripts\addons\cycles\osl.py", line 41, in update_script_node
    import shutil
  File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\shutil.py", line 10, in <module>
    import fnmatch
  File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\fnmatch.py", line 15, in <module>
    import functools
  File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\functools.py", line 23, in <module>
    from weakref import WeakKeyDictionary
  File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\weakref.py", line 12, in <module>
    from _weakref import (
ImportError: cannot import name '_remove_dead_weakref'

location: <unknown location>:-1

location: <unknown location>:-1
It seems a python problem. I'm using Windows10/x64 and this is the output of the error with factory settings: ``` found bundled python: C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 673, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 665, in exec_module File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\importlib\__init__.py", line 57, in <module> import types File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\types.py", line 166, in <module> import functools as _functools File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\functools.py", line 23, in <module> from weakref import WeakKeyDictionary File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\weakref.py", line 12, in <module> from _weakref import ( ImportError: cannot import name '_remove_dead_weakref' During handling of the above exception, another exception occurred: SystemError: <built-in function register> returned a result with an error set Traceback (most recent call last): File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\scripts\addons\cycles\__init__.py", line 101, in update_script_node osl.update_script_node(node, self.report) File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\scripts\addons\cycles\osl.py", line 41, in update_script_node import shutil File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\shutil.py", line 10, in <module> import fnmatch File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\fnmatch.py", line 15, in <module> import functools File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\functools.py", line 23, in <module> from weakref import WeakKeyDictionary File "C:\Users\Porces\Desktop\blender-2.79-rc1-windows64\2.79\python\lib\weakref.py", line 12, in <module> from _weakref import ( ImportError: cannot import name '_remove_dead_weakref' location: <unknown location>:-1 location: <unknown location>:-1 ```
Member

i'm also unable to repro on win10/32 bit.... in the future please be EXACT from the start on what you are running on so we don't waste a ton of time chasing ghosts.

while i install win10/x64, can you try the following

  1. shut down blender.
  2. go to

C:\Users[your user]\AppData\Roaming\Blender Foundation\Blender\2.79

and temporary rename it to

C:\Users[your user]\AppData\Roaming\Blender Foundation\Blender\2.79.bak

  1. start blender and retry..
i'm also unable to repro on win10/32 bit.... in the future please be *EXACT* from the start on what you are running on so we don't waste a ton of time chasing ghosts. while i install win10/x64, can you try the following 1) shut down blender. 2) go to C:\Users\[your user]\AppData\Roaming\Blender Foundation\Blender\2.79 and temporary rename it to C:\Users\[your user]\AppData\Roaming\Blender Foundation\Blender\2.79.bak 3) start blender and retry..
Author

Changing the 2.79 folder's name, or removing it completly still produces the same error in my win10/x64 machine.

I don't have any other OS in this machine to test it, but i'll try in the weekend to test it in linux to see if it happens there also.

Changing the 2.79 folder's name, or removing it completly still produces the same error in my win10/x64 machine. I don't have any other OS in this machine to test it, but i'll try in the weekend to test it in linux to see if it happens there also.
Member

can't reproduce on win10/x64 either.. maybe the unpacking somehow got interrupted and it's missing files? try redownloading the .zip and unpacking it again...

can't reproduce on win10/x64 either.. maybe the unpacking somehow got interrupted and it's missing files? try redownloading the .zip and unpacking it again...

Added subscriber: @Sergey

Added subscriber: @Sergey

Please attach exact .blends file which demonstrates the issue.

Please attach exact .blends file which demonstrates the issue.

Added subscriber: @brecht

Added subscriber: @brecht

Do you have Python installed? Searching for this error message shows it's likely related to conflicting Python versions. More info on that:
https://docs.blender.org/manual/en/dev/troubleshooting/python.html

Do you have Python installed? Searching for this error message shows it's likely related to conflicting Python versions. More info on that: https://docs.blender.org/manual/en/dev/troubleshooting/python.html
Author

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Miguel Porces self-assigned this 2017-08-13 15:21:01 +02:00
Author

After all it was my fault.

Some python files were corrupted.. Downloaded Blender again and it's now working.

sorry for the trouble

After all it was my fault. Some python files were corrupted.. Downloaded Blender again and it's now working. sorry for the trouble
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
4 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#52358
No description provided.