Install addon from the AddonPreferences example #81961

Closed
opened 2020-10-22 14:55:46 +02:00 by Sergey · 4 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: Intel(R) HD Graphics 630 Intel 4.5.0 - Build 25.20.100.6471

Blender Version
Broken: version: 2.90.1, branch: master, commit date: 2020-09-23 06:43, hash: 3e85bb34d0
Worked: (newest version of Blender that worked as expected)

Short description of error
I was trying to install addon test.py
from here: https://docs.blender.org/api/current/bpy.types.AddonPreferences.html

And now whenever I go to the addon preferences
2020-10-22_16-46-13.png

I'm getting next error

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\startup\bl_ui\space_userpref.py", line 1761, in draw
    for mod in addon_utils.modules(refresh=False)
  File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\addon_utils.py", line 208, in modules
    modules_refresh(module_cache)
  File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\addon_utils.py", line 195, in modules_refresh
    force_support=force_support,
  File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\addon_utils.py", line 137, in fake_module
    mod.bl_info = ast.literal_eval(body.value)
  File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\python\lib\ast.py", line 91, in literal_eval
    return _convert(node_or_string)
  File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\python\lib\ast.py", line 79, in _convert
    map(_convert, node.values)))
  File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\python\lib\ast.py", line 90, in _convert
    return _convert_signed_num(node)
  File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\python\lib\ast.py", line 63, in _convert_signed_num
    return _convert_num(node)
  File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\python\lib\ast.py", line 55, in _convert_num
    raise ValueError('malformed node or string: ' + repr(node))
ValueError: malformed node or string: <_ast.Name object at 0x0000014F702D1448>

Reinstall Blender did not help.

Probably it has happened because of this string bl_info = {"name": __name__, ..., but how to fix it now?

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: Intel(R) HD Graphics 630 Intel 4.5.0 - Build 25.20.100.6471 **Blender Version** Broken: version: 2.90.1, branch: master, commit date: 2020-09-23 06:43, hash: `3e85bb34d0` Worked: (newest version of Blender that worked as expected) **Short description of error** I was trying to install addon [test.py](https://archive.blender.org/developer/F9035620/test.py) from here: https://docs.blender.org/api/current/bpy.types.AddonPreferences.html And now whenever I go to the addon preferences ![2020-10-22_16-46-13.png](https://archive.blender.org/developer/F9035630/2020-10-22_16-46-13.png) I'm getting next error ``` Traceback (most recent call last): File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\startup\bl_ui\space_userpref.py", line 1761, in draw for mod in addon_utils.modules(refresh=False) File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\addon_utils.py", line 208, in modules modules_refresh(module_cache) File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\addon_utils.py", line 195, in modules_refresh force_support=force_support, File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\addon_utils.py", line 137, in fake_module mod.bl_info = ast.literal_eval(body.value) File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\python\lib\ast.py", line 91, in literal_eval return _convert(node_or_string) File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\python\lib\ast.py", line 79, in _convert map(_convert, node.values))) File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\python\lib\ast.py", line 90, in _convert return _convert_signed_num(node) File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\python\lib\ast.py", line 63, in _convert_signed_num return _convert_num(node) File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\python\lib\ast.py", line 55, in _convert_num raise ValueError('malformed node or string: ' + repr(node)) ValueError: malformed node or string: <_ast.Name object at 0x0000014F702D1448> ``` Reinstall Blender did not help. Probably it has happened because of this string `bl_info = {"name": __name__, ...`, but how to fix it now?
Author

Added subscriber: @randum

Added subscriber: @randum

Closed as duplicate of blender/blender-addons#53617

Closed as duplicate of blender/blender-addons#53617

Added subscriber: @rjg

Added subscriber: @rjg

Probably it has happened because of this string bl_info = {"name": name, ..., but how to fix it now?

I would suggest you open C:\Users\[your username]\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons and delete the test.py in that folder.

> Probably it has happened because of this string bl_info = {"name": __name__, ..., but how to fix it now? I would suggest you open `C:\Users\[your username]\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons` and delete the `test.py` in that folder.
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
2 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#81961
No description provided.