Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I solve AttributeError: '__RestrictContext' object has no attribute 'scene' problem? #201

Closed
Stern-Hayat opened this issue May 15, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Stern-Hayat
Copy link

Stern-Hayat commented May 15, 2022

Hello.

I installed your wonderful concept add-ons on my Mac, and I tried [Preferences] -> checked [Mesh: Building Tools].
Then 'AttributeError: '__RestrictContext' object has no attribute 'scene' error occurs and I cannot activate add-ons.

How can I solve the problem?

blender version: 3.0.0
add-on version: 1.0.9

Thank you.

error ====================================================================================

Traceback (most recent call last):
File "/Applications/Blender 2.app/Contents/Resources/3.0/scripts/modules/addon_utils.py", line 351, in enable
mod = import(module_name)
File "/Users…/Blender/3.0/scripts/addons/building_tools-master/init.py", line 2, in
from .btools.building.register import register_building, unregister_building
File "/Users…/Blender/3.0/scripts/addons/building_tools-master/btools/building/register.py", line 2, in
from .arch import ArchProperty
File "/Users…/Blender/3.0/scripts/addons/building_tools-master/btools/building/arch.py", line 26, in
class ArchProperty(bpy.types.PropertyGroup):
File "/Users…/Blender/3.0/scripts/addons/building_tools-master/btools/building/arch.py", line 45, in ArchProperty
min=get_scaled_unit(0.01),
File "/Users…/Blender/3.0/scripts/addons/building_tools-master/btools/utils/util_common.py", line 146, in get_scaled_unit
scale = bpy.context.scene.unit_settings.scale_length
AttributeError: '_RestrictContext' object has no attribute 'scene'

@Stern-Hayat Stern-Hayat added the bug Something isn't working label May 15, 2022
@ranjian0
Copy link
Owner

Try using the zip from the releases rather than the master branch. I will try to get a fix out today.
https://github.com/ranjian0/building_tools/releases/download/v1.0.9/building_tools-v1.0.9.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants