Attempts to import the site module are met with a TypeError exception. #29635
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#29635
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%Operating System: Windows 7 32-Bit
Video Card: ATI Radeon HD 5450 with catalyst version 11.11
Blender 2.61 Windows binary
When running a python script or executing lines in the python console, if I attempt to import the site module (done by executing the line "import site") the following error message is displayed by the interpreter:
Traceback (most recent call last):
TypeError: unhashable type: 'list'
It seems that some of the values contained in the dict_values construct returned by sys.modules.values() cannot be added to a set. When comparing the types of objects contained in the dict_values construct between Blender 2.60 and 2.61 there were two new types in the 2.61 version:
<class 'bpy.app.handlers'>
<class 'bpy.app'>
It is my hypothesis that when either of the two objects in the dict_values list that are of these types are being added to the set, the exception is thrown. As a temporary work around, I explicitly make the set by iterating through the list returned by sys.modules.values(), adding each element to a temporary set one at a time. I surround the addition of each element with a try/except block to prevent erroneous objects from being added. A sample is below:
BEFORE:
for m in set(sys.modules.values()):
AFTER:
Changed status to: 'Open'
%%%fixed r42657.%%%
Changed status from 'Open' to: 'Resolved'