Script cannot be enabled #87545

Closed
opened 2021-04-16 03:29:25 +02:00 by fn930211969 · 10 comments

System Information
Operating system: Deepin 20.2
Graphics card: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)

Blender Version
Broken:
blender-2.93.0-2cc3a89cf60d-linux64 && blender-2.92.0 && blender-2.91.2

Short description of error
1.Open the Blender 2.93 Reference Manual
2.Add the following script to the Text editor in Blender
Screenshot_select-area_20210416084818.png

3.Click the Run Script button
3.Open the Operator Search menu and type in “Move X by One” (the bl_label)
Screenshot_select-area_20210416085452.png

4.Click to disable script, it will report an error
Screenshot_select-area_20210416085619.png

error code:
Traceback (most recent call last):

File "/home/bfn/Downloads/blender-2.93.0-2cc3a89cf60d-linux64/blender-2.93.0-2cc3a89cf60d-linux64/2.93/scripts/modules/addon_utils.py", line 438, in disable
  mod.unregister()
File "/home/bfn/.config/blender/2.93/scripts/addons/frist.py", line 31, in unregister
  bpy.utils.unregister_class(ObjectMoveX)

RuntimeError: unregister_class(...):, missing bl_rna attribute from 'RNAMeta' instance (may not be registered)

**System Information** Operating system: Deepin 20.2 Graphics card: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) **Blender Version** Broken: blender-2.93.0-2cc3a89cf60d-linux64 && blender-2.92.0 && blender-2.91.2 **Short description of error** 1.Open the Blender 2.93 Reference Manual 2.Add the following script to the Text editor in Blender ![Screenshot_select-area_20210416084818.png](https://archive.blender.org/developer/F9935467/Screenshot_select-area_20210416084818.png) 3.Click the Run Script button 3.Open the Operator Search menu and type in “Move X by One” (the bl_label) ![Screenshot_select-area_20210416085452.png](https://archive.blender.org/developer/F9935465/Screenshot_select-area_20210416085452.png) 4.Click to disable script, it will report an error ![Screenshot_select-area_20210416085619.png](https://archive.blender.org/developer/F9935468/Screenshot_select-area_20210416085619.png) error code: Traceback (most recent call last): ``` File "/home/bfn/Downloads/blender-2.93.0-2cc3a89cf60d-linux64/blender-2.93.0-2cc3a89cf60d-linux64/2.93/scripts/modules/addon_utils.py", line 438, in disable mod.unregister() File "/home/bfn/.config/blender/2.93/scripts/addons/frist.py", line 31, in unregister bpy.utils.unregister_class(ObjectMoveX) ``` RuntimeError: unregister_class(...):, missing bl_rna attribute from 'RNAMeta' instance (may not be registered)
Author

Added subscriber: @fn930211969

Added subscriber: @fn930211969

Added subscriber: @rjg

Added subscriber: @rjg

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

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

You seem to be doing something different than your instructions state as the script is installed as an add-on. Just by running the script from the text editor won't make it appear in the add-on preferences.

It seems the steps you've actually performed were:

  • Copy and paste the code from the manual into a file named frist.py and then manually saved it to blender/2.93/scripts/addons
  • Opened Blender and enabled the add-on in the preferences (Edit > Preferences > Add-ons)
  • Switched to the Scripting workspace and loaded the frist.py into the text editor.
  • Ran the script in the text editor.
  • Used {key F3} with Developer Extras enabled to find Move X By One
  • After executing the operator you've tried to disable the registered add-on.

Is that correct?

You seem to be doing something different than your instructions state as the script is installed as an add-on. Just by running the script from the text editor won't make it appear in the add-on preferences. It seems the steps you've actually performed were: - Copy and paste the [code from the manual ](https://docs.blender.org/manual/en/latest/advanced/scripting/addon_tutorial.html) into a file named `frist.py` and then manually saved it to `blender/2.93/scripts/addons` - Opened Blender and enabled the add-on in the preferences (*Edit > Preferences > Add-ons*) - Switched to the *Scripting* workspace and loaded the `frist.py` into the text editor. - Ran the script in the text editor. - Used {key F3} with *Developer Extras* enabled to find *Move X By One* - After executing the operator you've tried to disable the registered add-on. Is that correct?
Author

In #87545#1147330, @rjg wrote:
You seem to be doing something different than your instructions state as the script is installed as an add-on. Just by running the script from the text editor won't make it appear in the add-on preferences.

It seems the steps you've actually performed were:

Copy and paste the code from the manual into a file named frist.py and then manually saved it to blender/2.93/scripts/addons

Opened Blender and enabled the add-on in the preferences (Edit > Preferences > Add-ons)

Switched to the Scripting workspace and loaded the frist.py into the text editor.

Ran the script in the text editor.

Used {key F3} with Developer Extras enabled to find Move X By One

After executing the operator you've tried to disable the registered add-on.

Is that correct?

Hi, thank you for answering the questions for me in your busy schedule. First of all, you questioned that my operation process is incorrect, but the same process is no problem on the windows platform (I have tried it)! Or you are sending me the correct operation process, I need to confirm it, thank you.

> In #87545#1147330, @rjg wrote: > You seem to be doing something different than your instructions state as the script is installed as an add-on. Just by running the script from the text editor won't make it appear in the add-on preferences. > > It seems the steps you've actually performed were: > # Copy and paste the [code from the manual ](https://docs.blender.org/manual/en/latest/advanced/scripting/addon_tutorial.html) into a file named `frist.py` and then manually saved it to `blender/2.93/scripts/addons` > # Opened Blender and enabled the add-on in the preferences (*Edit > Preferences > Add-ons*) > # Switched to the *Scripting* workspace and loaded the `frist.py` into the text editor. > # Ran the script in the text editor. > # Used {key F3} with *Developer Extras* enabled to find *Move X By One* > # After executing the operator you've tried to disable the registered add-on. > > Is that correct? Hi, thank you for answering the questions for me in your busy schedule. First of all, you questioned that my operation process is incorrect, but the same process is no problem on the windows platform (I have tried it)! Or you are sending me the correct operation process, I need to confirm it, thank you.

@fn930211969 What I meant is that the screenshots you've added don't match the description of your steps. It seems that you have installed the add-on first, hence it's visible in the preferences, and you are running it from text editor as well. By running the same script in the editor you would try to register the operator a second time, which will cause trouble when trying to deactivate the add-on that originally registered the operator. The steps I've posted result in the error you're describing in your report and I would like to know if those are the steps you've actually taken.

@fn930211969 What I meant is that the screenshots you've added don't match the description of your steps. It seems that you have installed the add-on first, hence it's visible in the preferences, and you are running it from text editor as well. By running the same script in the editor you would try to register the operator a second time, which will cause trouble when trying to deactivate the add-on that originally registered the operator. The steps I've posted result in the error you're describing in your report and I would like to know if those are the steps you've actually taken.
Author

In #87545#1147641, @rjg wrote:
@fn930211969 What I meant is that the screenshots you've added don't match the description of your steps. It seems that you have installed the add-on first, hence it's visible in the preferences, and you are running it from text editor as well. By running the same script in the editor you would try to register the operator a second time, which will cause trouble when trying to deactivate the add-on that originally registered the operator. The steps I've posted result in the error you're describing in your report and I would like to know if those are the steps you've actually taken.

Yes, my main problem is that I can’t find this custom script in Operator Search, even though I have enabled and loaded this custom script

> In #87545#1147641, @rjg wrote: > @fn930211969 What I meant is that the screenshots you've added don't match the description of your steps. It seems that you have installed the add-on first, hence it's visible in the preferences, and you are running it from text editor as well. By running the same script in the editor you would try to register the operator a second time, which will cause trouble when trying to deactivate the add-on that originally registered the operator. The steps I've posted result in the error you're describing in your report and I would like to know if those are the steps you've actually taken. Yes, my main problem is that I can’t find this custom script in Operator Search, even though I have enabled and loaded this custom script

In order to find operators that haven't been added to any menu, you need to enable Developer Extras in the preferences. See blender/documentation#87180 for detailed instructions.

In order to find operators that haven't been added to any menu, you need to enable *Developer Extras* in the preferences. See blender/documentation#87180 for detailed instructions.
Author

In #87545#1147933, @rjg wrote:
In order to find operators that haven't been added to any menu, you need to enable Developer Extras in the preferences. See blender/documentation#87180 for detailed instructions.

Thank you, I have solved the problem。

> In #87545#1147933, @rjg wrote: > In order to find operators that haven't been added to any menu, you need to enable *Developer Extras* in the preferences. See blender/documentation#87180 for detailed instructions. Thank you, I have solved the problem。
Author

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

Changed status from 'Needs User Info' to: 'Resolved'
Sign in to join this conversation.
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-addons#87545
No description provided.