Autocompletion error in console #95521

Closed
opened 2022-02-05 13:11:48 +01:00 by Marek Smoliński · 8 comments

Operating system: Windows 10
Blender 3.0.0
build 2021-12-02 18:35

I can't reproduce the error, I kept the instance where it happens, so if you give me instructions to dump memory or something, I can do that. I have a variable storing a reference to Principled BSDF's Subsurface Radius input, typing the name of this variable, a dot, and pressing TAB key for autocompletion produces the error visible below (the error displays above the currently typed line):

>>> sr

bpy.data.node_groups['Shader Nodetree']...NodeSocketVector

Traceback (most recent call last):
  File "E:\Program Files\Blender3\3.0\scripts\modules\console_python.py", line 259, in autocomplete
    result = intellisense.expand(
  File "E:\Program Files\Blender3\3.0\scripts\modules\console\intellisense.py", line 129, in expand
    matches, word = complete(line, cursor, namespace, private)
  File "E:\Program Files\Blender3\3.0\scripts\modules\console\intellisense.py", line 90, in complete
    matches = complete_namespace.complete(word, namespace, private=private)
  File "E:\Program Files\Blender3\3.0\scripts\modules\console\complete_namespace.py", line 154, in complete
    matches = complete_names(word, namespace)
  File "E:\Program Files\Blender3\3.0\scripts\modules\console\complete_namespace.py", line 61, in complete_names
    completer.complete(word, 0)
  File "E:\Program Files\Blender3\3.0\python\lib\rlcompleter.py", line 89, in complete
    self.matches = self.attr_matches(text)
  File "E:\Program Files\Blender3\3.0\python\lib\rlcompleter.py", line 182, in attr_matches
    if (value := getattr(thisobject, word, None)) is not None:
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 1-2: invalid continuation byte

>>> sr.

Operating system: Windows 10 Blender 3.0.0 build 2021-12-02 18:35 I can't reproduce the error, I kept the instance where it happens, so if you give me instructions to dump memory or something, I can do that. I have a variable storing a reference to Principled BSDF's `Subsurface Radius` input, typing the name of this variable, a dot, and pressing TAB key for autocompletion produces the error visible below (the error displays above the currently typed line): ``` >>> sr bpy.data.node_groups['Shader Nodetree']...NodeSocketVector Traceback (most recent call last): File "E:\Program Files\Blender3\3.0\scripts\modules\console_python.py", line 259, in autocomplete result = intellisense.expand( File "E:\Program Files\Blender3\3.0\scripts\modules\console\intellisense.py", line 129, in expand matches, word = complete(line, cursor, namespace, private) File "E:\Program Files\Blender3\3.0\scripts\modules\console\intellisense.py", line 90, in complete matches = complete_namespace.complete(word, namespace, private=private) File "E:\Program Files\Blender3\3.0\scripts\modules\console\complete_namespace.py", line 154, in complete matches = complete_names(word, namespace) File "E:\Program Files\Blender3\3.0\scripts\modules\console\complete_namespace.py", line 61, in complete_names completer.complete(word, 0) File "E:\Program Files\Blender3\3.0\python\lib\rlcompleter.py", line 89, in complete self.matches = self.attr_matches(text) File "E:\Program Files\Blender3\3.0\python\lib\rlcompleter.py", line 182, in attr_matches if (value := getattr(thisobject, word, None)) is not None: UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 1-2: invalid continuation byte >>> sr. ```

Added subscriber: @Etherlord

Added subscriber: @Etherlord
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Thanks for the report. Can't reproduce on both 3.0.0 and current master.

I am very uncertain about these unicode error. Can you provide us more clear instruction to reproduce the issue.

What I have done for replicating the issue:

>>> sr.```
Thanks for the report. Can't reproduce on both 3.0.0 and current master. I am very uncertain about these unicode error. Can you provide us more clear instruction to reproduce the issue. What I have done for replicating the issue: ```>>> sr = D.materials["Material"].node_tree.nodes["Principled BSDF"].inputs- [x].default_value[0] >>> sr.```

I don't think I can reproduce the bug, I only reported it on the off-chance the error message points to a line which makes it clear what causes the bug (e.g. some assumption the dev assumed to be unlikely False, and yet it was here).

I did a few things in this project that could possibly cause this:

  1. I wrote a custom operator and tried to register it as: D.texts['text'].as_module().register() only to discover that it still errors out - I reported it when I discovered it stopped working in 2.93: https://developer.blender.org/T89193
    And so this error could corrupt the the console state somehow...

  2. Eventually I registered a custom operator, a rather simple one, the only suspicious thing it does is setting two attributes on window_manager in order to easily unregister the class...

  3. I fiddled in the shader editor (where I switched the properties panel to the console by pressing F4 and where the error happens), changing some Principled BSDF Vector sockets to display values...

If anything, I would bet on p. 1.... Either way, the bug is not very problematic, as restarting the project gets rid of the bug.

I don't think I can reproduce the bug, I only reported it on the off-chance the error message points to a line which makes it clear what causes the bug (e.g. some assumption the dev assumed to be unlikely False, and yet it was here). I did a few things in this project that could possibly cause this: 1. I wrote a custom operator and tried to register it as: `D.texts['text'].as_module().register()` only to discover that it still errors out - I reported it when I discovered it stopped working in 2.93: https://developer.blender.org/T89193 And so this error could corrupt the the console state somehow... 2. Eventually I registered a custom operator, a rather simple one, the only suspicious thing it does is setting two attributes on window_manager in order to easily unregister the class... 3. I fiddled in the shader editor (where I switched the properties panel to the console by pressing F4 and where the error happens), changing some Principled BSDF Vector sockets to display values... If anything, I would bet on p. 1.... Either way, the bug is not very problematic, as restarting the project gets rid of the bug.
Member

I don't think I can reproduce the bug,

@Etherlord hi, we may not able to fix the problem with reproducing.

Can you provide your "text" file?

> I don't think I can reproduce the bug, @Etherlord hi, we may not able to fix the problem with reproducing. Can you provide your "text" file?
Member

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Member

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.

Thanks again for the report. If the problem persists please open a new report with the required information.

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed. Thanks again for the report. If the problem persists please open a new report with the required information.
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#95521
No description provided.