Opened 5 years ago

Closed 5 years ago

#3436 closed defect (fixed)

During undo, self._positions is None

Reported by: chimerax-bug-report@… Owned by: Eric Pettersen
Priority: normal Milestone:
Component: Undo/Redo Version:
Keywords: Cc: chimera-programmers
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Darwin-19.5.0-x86_64-i386-64bit
ChimeraX Version: 1.0 (2020-06-04 23:15:07 UTC)
Description
(Describe the actions that caused this problem to occur here)

Log:
UCSF ChimeraX version: 1.0 (2020-06-04)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open "/Users/Bruce/Desktop/Radiation Inactivation/6m1d.pdb" format pdb

6m1d.pdb title:  
ACE2-B0AT1 complex, open conformation [more info...]  
  
Chain information for 6m1d.pdb #1  
---  
Chain | Description  
A C | sodium-dependent neutral amino acid transporter B(0)AT1  
B D | angiotensin-converting enzyme 2  
  

> select /A:5-609

4799 atoms, 4942 bonds, 1 model selected  

> select /A:5-609

4799 atoms, 4942 bonds, 1 model selected  

> select /C:5-609

4799 atoms, 4942 bonds, 1 model selected  

> select /B:21-768

6089 atoms, 6255 bonds, 1 model selected  

> select /D:21-768

6089 atoms, 6255 bonds, 1 model selected  

> select /A:5-609

4799 atoms, 4942 bonds, 1 model selected  

> ui tool show Distances

Exactly two atoms must be selected!  

> ui tool show Distances

> view clip false

> show target m

Exactly two atoms must be selected!  

> ui tool show Distances

> ui tool show Distances

Exactly two atoms must be selected!  

> ui tool show Distances

Exactly two atoms must be selected!  

> toolshed show

Exactly two atoms must be selected!  

> select

21776 atoms, 22394 bonds, 1 model selected  

> select clear

Exactly two atoms must be selected!  

> color sel bychain

> interfaces sel & ~solvent

0 buried areas:  
Exactly two atoms must be selected!  

> set bgColor white

> save /Users/Bruce/Desktop/image1.png supersample 3

> lighting simple

> lighting full

> lighting simple

> show sel cartoons

> hide sel cartoons

> show sel cartoons

> ui tool show "Color Actions"

> color sel bychain

> graphics silhouettes true

> lighting shadows true

> lighting shadows false

> lighting simple

> lighting full

> lighting simple

> lighting shadows true

> lighting shadows false

> graphics silhouettes false

> graphics silhouettes true

> view sel

Exactly two atoms must be selected!  

> undo

> select disulfide

20 atoms, 10 bonds, 1 model selected  

> show (sel-residues & sidechain) target ab

> color sel bychain

> color sel bypolymer

> color sel bychain

> color sel bypolymer

> preset "molecular surfaces" "chain id coloring (opaque)"

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    surface
    color bychain targ s trans 0

  

> undo

> undo

> undo

> transparency (#!1 & sel) 50

> close

> open "/Users/Bruce/Desktop/Radiation Inactivation/6m1d.pdb" format pdb

6m1d.pdb title:  
ACE2-B0AT1 complex, open conformation [more info...]  
  
Chain information for 6m1d.pdb #1  
---  
Chain | Description  
A C | sodium-dependent neutral amino acid transporter B(0)AT1  
B D | angiotensin-converting enzyme 2  
  

> preset "molecular surfaces" "chain id coloring (opaque)"

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    surface
    color bychain targ s trans 0

  

> undo

> preset cartoons/nucleotides ribbons/slabs

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    show nucleic
    hide protein|solvent|H
    surf hide
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    cartoon
    cartoon style modeh def arrows t arrowshelix f arrowscale 2 wid 2 thick 0.4 sides 12 div 20
    cartoon style ~(nucleic|strand) x round
    cartoon style (nucleic|strand) x rect
    nucleotides tube/slab shape box

  

> preset cartoons/nucleotides cylinders/stubs

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    show nucleic
    hide protein|solvent|H
    surf hide
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    cartoon
    cartoon style modeh def arrows t arrowshelix f arrowscale 2 wid 2 thick 0.4 sides 12 div 20
    cartoon style ~(nucleic|strand) x round
    cartoon style (nucleic|strand) x rect
    cartoon style protein modeh tube rad 2 sides 24 thick 0.6
    cartoon style nucleic x round width 1.6 thick 1.6
    nucleotides stubs

  

> preset cartoons/nucleotides licorice/ovals

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    show nucleic
    hide protein|solvent|H
    surf hide
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    cartoon
    cartoon style modeh def arrows t arrowshelix f arrowscale 2 wid 2 thick 0.4 sides 12 div 20
    cartoon style ~(nucleic|strand) x round
    cartoon style (nucleic|strand) x rect
    cartoon style protein modeh default arrows f x round width 1 thick 1
    cartoon style nucleic x round width 1.6 thick 1.6
    nucleotides tube/slab shape ellipsoid

  

> preset "initial styles" cartoon

Preset implemented in Python; no expansion to individual ChimeraX commands
available.  

> preset "initial styles" "original look"

Preset implemented in Python; no expansion to individual ChimeraX commands
available.  

> preset "initial styles" sticks

Preset implemented in Python; no expansion to individual ChimeraX commands
available.  

> preset cartoons/nucleotides licorice/ovals

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    show nucleic
    hide protein|solvent|H
    surf hide
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    cartoon
    cartoon style modeh def arrows t arrowshelix f arrowscale 2 wid 2 thick 0.4 sides 12 div 20
    cartoon style ~(nucleic|strand) x round
    cartoon style (nucleic|strand) x rect
    cartoon style protein modeh default arrows f x round width 1 thick 1
    cartoon style nucleic x round width 1.6 thick 1.6
    nucleotides tube/slab shape ellipsoid

  

> preset "initial styles" "original look"

Preset implemented in Python; no expansion to individual ChimeraX commands
available.  

> preset cartoons/nucleotides ribbons/slabs

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    show nucleic
    hide protein|solvent|H
    surf hide
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    cartoon
    cartoon style modeh def arrows t arrowshelix f arrowscale 2 wid 2 thick 0.4 sides 12 div 20
    cartoon style ~(nucleic|strand) x round
    cartoon style (nucleic|strand) x rect
    nucleotides tube/slab shape box

  

> color bychain

> preset "initial styles" cartoon

Preset implemented in Python; no expansion to individual ChimeraX commands
available.  

> preset "molecular surfaces" "chain id coloring (opaque)"

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    surface
    color bychain targ s trans 0

  

> preset "molecular surfaces" "atomic coloring (transparent)"

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    surface
    color fromatoms targ s trans 70

  

> preset "initial styles" "original look"

Preset implemented in Python; no expansion to individual ChimeraX commands
available.  

> preset "overall look" publication

Preset expands to these ChimeraX commands:

    
    
    set bg white
    graphics silhouettes t

  

> preset cartoons/nucleotides ribbons/slabs

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    show nucleic
    hide protein|solvent|H
    surf hide
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    cartoon
    cartoon style modeh def arrows t arrowshelix f arrowscale 2 wid 2 thick 0.4 sides 12 div 20
    cartoon style ~(nucleic|strand) x round
    cartoon style (nucleic|strand) x rect
    nucleotides tube/slab shape box

  

> preset "overall look" interactive

Preset expands to these ChimeraX commands:

    
    
    ~set bg
    graphics silhouettes f

  

> undo

> set bgColor white

> color bychain

> preset cartoons/nucleotides ribbons/slabs

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    show nucleic
    hide protein|solvent|H
    surf hide
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    cartoon
    cartoon style modeh def arrows t arrowshelix f arrowscale 2 wid 2 thick 0.4 sides 12 div 20
    cartoon style ~(nucleic|strand) x round
    cartoon style (nucleic|strand) x rect
    nucleotides tube/slab shape box

  

> view

> ui tool show "Color Actions"

> color bychain

> color bychain

> color bychain

> select disulfide

20 atoms, 10 bonds, 1 model selected  

> show (#!1 & sel-residues & sidechain) target ab

> color sel bypolymer

> color sel bypolymer

> color sel bychain

> color sel byhetero

> rainbow sel

> color bfactor sel

20 atoms, 20 residues, 4 surfaces, atom bfactor range 184 to 1e+03  

> color sel bychain

> color sel bychain

> undo

> undo

> undo

> color sel bychain

> mlp sel

Map values for surface "6m1d.pdb_A SES surface": minimum -27.09, mean -0.0378,
maximum 23.04  
Map values for surface "6m1d.pdb_B SES surface": minimum -30.06, mean -2.94,
maximum 24.14  
Map values for surface "6m1d.pdb_C SES surface": minimum -27.23, mean
-0.04426, maximum 24.26  
Map values for surface "6m1d.pdb_D SES surface": minimum -29.82, mean -2.909,
maximum 24.47  

> hbonds sel

0 hydrogen bonds found  

> style sel sphere

Changed 20 atom styles  

> style sel stick

Changed 20 atom styles  

> ui mousemode right "link markers"

> preset "initial styles" "original look"

Preset implemented in Python; no expansion to individual ChimeraX commands
available.  

> show sel atoms

> color sel bychain

> style sel stick

Changed 20 atom styles  

> open /Users/Bruce/Downloads/3PH.cif

> preset cartoons/nucleotides ribbons/slabs

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    show nucleic
    hide protein|solvent|H
    surf hide
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    cartoon
    cartoon style modeh def arrows t arrowshelix f arrowscale 2 wid 2 thick 0.4 sides 12 div 20
    cartoon style ~(nucleic|strand) x round
    cartoon style (nucleic|strand) x rect
    nucleotides tube/slab shape box

  

> preset cartoons/nucleotides ribbons/slabs

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    show nucleic
    hide protein|solvent|H
    surf hide
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    cartoon
    cartoon style modeh def arrows t arrowshelix f arrowscale 2 wid 2 thick 0.4 sides 12 div 20
    cartoon style ~(nucleic|strand) x round
    cartoon style (nucleic|strand) x rect
    nucleotides tube/slab shape box

  

> preset "overall look" publication

Preset expands to these ChimeraX commands:

    
    
    set bg white
    graphics silhouettes t

  

> color sel bychain

> select disulfide

20 atoms, 10 bonds, 1 model selected  

> delete atoms (#!1 & sel)

> delete bonds (#!1 & sel)

> ui tool show "Color Actions"

> color bychain

> hide #1.5#!1 target a

> hide #1.5#!1 target a

> color bychain

> color bychain

> color orange

> color bychain

> color lime

> color bychain

> color bypolymer

> color bychain

> hide surfaces

> hide surfaces

> hide atoms

> show atoms

> show atoms

> hide atoms

> show atoms

> show cartoons

> hide cartoons

> show cartoons

> show surfaces

> hide surfaces

> show atoms

> hide atoms

> show atoms

> hide atoms

> hide atoms

> show atoms

> hide atoms

> hide atoms

> show atoms

> show cartoons

> hide cartoons

> hide cartoons

> show cartoons

> style stick

Changed 21756 atom styles  

> style ball

Changed 21756 atom styles  

> style sphere

Changed 21756 atom styles  

> style ball

Changed 21756 atom styles  

> nucleotides tube/slab shape box

> nucleotides tube/slab shape box

> nucleotides atoms

> style nucleic stick

Changed 0 atom styles  

> nucleotides atoms

> style nucleic stick

Changed 0 atom styles  

> nucleotides atoms

> style nucleic stick

Changed 0 atom styles  

> nucleotides atoms

> style nucleic stick

Changed 0 atom styles  

> nucleotides tube/slab shape box

> nucleotides ladder

> hide atoms

> nucleotides ladder

> nucleotides ladder

> nucleotides atoms

> style nucleic stick

Changed 0 atom styles  

> show atoms

> hide cartoons

> show cartoons

> hide atoms

> show atoms

> hide atoms

> color bychain

> color bychain

> color bypolymer

> color bychain

> hide #1.5 models

> show #1.5 models

> hide #1.1 models

> show #1.1 models

> select #1.1

4795 atoms, 1 model selected  

> ~select #1.1

1 model selected  

> select #1.1

4795 atoms, 1 model selected  

> ~select #1.1

1 model selected  

> select #1.1

4795 atoms, 1 model selected  

> ~select #1.1

1 model selected  

> hide #1.1 models

> show #1.1 models

> color bychain

> hide #1.1 models

> show #1.1 models

> show target m

> show target m

> show target m

> show target m

> show target m

> show target m

> show target m

> show target m

> view clip false

> view clip false

> view clip false

> view clip false

> show target m

> cartoon

> show target m

> show target m

> show target m

> show target m

> show target m

> view clip false

> view clip false

> view clip false

> view clip false

> view clip false

> view clip false

> view clip false

> select #1.1

4795 atoms, 1 model selected  

> select #1.2

6083 atoms, 1 model selected  

> select #1.3

4795 atoms, 1 model selected  

> select #1.4

6083 atoms, 1 model selected  

> select #1.3

4795 atoms, 1 model selected  

> select #1.2

6083 atoms, 1 model selected  

> select #1.1

4795 atoms, 1 model selected  

> select #1.2

6083 atoms, 1 model selected  

> view #1.2 clip false

No displayed objects specified.  

> show #1.2 target m

> ~select #1.2

1 model selected  

> ~select #1.5

Nothing selected  

> select #1.1

4795 atoms, 1 model selected  

> color (#!1 & sel) orange

> ~select #1.1

1 model selected  

> select #1.1

4795 atoms, 1 model selected  

> ~select #1.1

1 model selected  

> select #1.1

4795 atoms, 1 model selected  

> color (#!1 & sel) purple

> ~select #1.1

1 model selected  

> select /B

6083 atoms, 6246 bonds, 1 model selected  

> color (#!1 & sel) medium blue

> select /A

4795 atoms, 4936 bonds, 1 model selected  

> color (#!1 & sel) orange

> select /B

6083 atoms, 6246 bonds, 1 model selected  

> color (#!1 & sel) cornflower blue

> select /D

6083 atoms, 6246 bonds, 1 model selected  

> color (#!1 & sel) lime

> select /C

4795 atoms, 4936 bonds, 1 model selected  

> color (#!1 & sel) purple

> ~select #1.3

4936 bonds, 2 models selected  

> select /A

4795 atoms, 4936 bonds, 1 model selected  

> color (#!1 & sel) orange red

> ~select #1.1

4936 bonds, 2 models selected  

> select clear

> ui tool show "Side View"

> graphics silhouettes false

> graphics silhouettes true

> lighting full

> lighting simple

> lighting soft

> lighting soft

> lighting full

> lighting simple

> lighting full

> lighting simple

> lighting full

> lighting simple

> lighting simple

> lighting full

> lighting simple

> lighting soft

> lighting simple

> lighting soft

> lighting full

> lighting simple

> lighting full

> lighting simple

> lighting full

> lighting simple

> lighting soft

> lighting simple

> save /Users/Bruce/Downloads/ACE2_B0AT1_tetramer.cxs

> select protein

21756 atoms, 22364 bonds, 1 model selected  

> cartoon (#!1 & sel)

> select clear

> show sidechain target ab

> undo

> ui tool show "Side View"

> select sidechain

13638 atoms, 11412 bonds, 1 model selected  

> select clear

> select sideonly

10932 atoms, 8872 bonds, 1 model selected  

> undo

> select sidechain

13638 atoms, 11412 bonds, 1 model selected  

> select clear

> show target ab

> hide target a

> hide #* target a

> show target ab

> style ball

Changed 21756 atom styles  

> style ringFill thin

Changed 2706 residue ring styles  

> undo

> undo

> undo

> select clear

> select up

Nothing selected  

> view

> undo

Alignment identifier is 1  
Alignment identifier is 2  
Exactly two atoms must be selected!  

> ui tool show Distances

> select sidechain

13638 atoms, 11412 bonds, 1 model selected  

> show (#!1 & sel-residues & sidechain) target ab

> undo

> hide (#!1 & sel-residues & (protein|nucleic)) target a

> cartoon hide (#!1 & sel-residues)

> show (#!1 & sel-residues & backbone) target ab

> undo

> undo

> select clear

> interfaces ~solvent

3 buried areas: B A 1042, D C 864, B D 738  

> undo

> redo

> undo

> undo

> undo

> select clear

> help help:user/tools/distances.html

> ui tool show Distances

> preset "molecular surfaces" "atomic coloring (transparent)"

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    surface
    color fromatoms targ s trans 70

  

> undo

> undo

> redo

> redo

> select clear

> preset cartoons/nucleotides ribbons/slabs

Changed 0 atom styles  
Preset expands to these ChimeraX commands:

    
    
    show nucleic
    hide protein|solvent|H
    surf hide
    style (protein|nucleic|solvent) & @@draw_mode=0 stick
    cartoon
    cartoon style modeh def arrows t arrowshelix f arrowscale 2 wid 2 thick 0.4 sides 12 div 20
    cartoon style ~(nucleic|strand) x round
    cartoon style (nucleic|strand) x rect
    nucleotides tube/slab shape box

  

> view

> undo

> color byhetero

Exactly two atoms must be selected!  

> select clear

> help help:user/menu.html#named-selections

> show target ab

> undo

> select /B

6083 atoms, 6246 bonds, 1 model selected  

> undo

> hbonds

1844 hydrogen bonds found  

> hbonds

1844 hydrogen bonds found  

> hbonds

1844 hydrogen bonds found  

> ~hbonds

> ~hbonds

> ~hbonds

> hbonds

1844 hydrogen bonds found  

> hbonds

1844 hydrogen bonds found  

> ~hbonds

> hbonds

1844 hydrogen bonds found  

> select clear

> undo

> undo

> hide target a

> undo

> undo

> undo

> undo

> select clear

> undo

> undo

> undo

> undo

> undo

> undo

> select clear

> ~hbonds

> ui tool show "Show Sequence Viewer"

> sequence chain /A /C

Alignment identifier is 1  

> ui mousemode right distance

> ui mousemode right "tape measure"

> marker segment #2 position 158,142.2,248.7 toPosition 166.2,167.9,247.1
> color yellow radius 0.1 label 27.05 labelHeight 2.705 labelColor yellow

> marker delete #2

> marker segment #2 position 157.8,148.1,230.2 toPosition 163.1,165.2,229.4
> color yellow radius 0.1 label 17.85 labelHeight 1.785 labelColor yellow

> select #2

2 atoms, 1 bond, 2 models selected  

> ~select #2

Nothing selected  

> ui mousemode right label

> label delete residues

> label delete residues

> label #1/B:57

> label #1/B:57

> label delete residues

> label height 5

> label height 4

> label height 5

> label height 5

> label delete residues

> label delete residues

> label #1/D:339

> label delete residues

> label #1/D:339

> ui mousemode right distance

> hide #1.5 models

> hide #!2 models

> show #!2 models

> ui mousemode right "move label"

> ui mousemode right "tape measure"

> marker delete #2

> marker segment #2 position 148.3,175.9,245.1 toPosition 138,150.1,243.3
> color yellow radius 0.1 label 27.79 labelHeight 2.779 labelColor yellow

> marker delete #2

> marker segment #2 position 144.2,144.9,249.2 toPosition 157.5,170,250.9
> color yellow radius 0.1 label 28.54 labelHeight 2.854 labelColor yellow

> marker delete #2

> marker segment #2 position 164.8,169.9,249.2 toPosition 159.2,147.5,259
> color yellow radius 0.1 label 25.02 labelHeight 2.502 labelColor yellow

> marker segment #2 position 164.8,169.9,249.2 toPosition 157.8,141.6,250.3
> color yellow radius 0.1 label 29.1 labelHeight 2.91 labelColor yellow

> marker delete #2

> marker segment #2 position 166.9,168,246.6 toPosition 160.3,141.8,247.3
> color yellow radius 0.1 label 26.99 labelHeight 2.699 labelColor yellow

> marker delete #2

> marker segment #2 position 166.9,168,246.6 toPosition 152.3,142.8,248.9
> color yellow radius 0.1 label 29.21 labelHeight 2.921 labelColor yellow

> ui mousemode right "tape measure"

> marker segment #2 position 153.8,164.3,183.5 toPosition 157.8,152.4,185.7
> color yellow radius 0.1 label 12.77 labelHeight 1.277 labelColor yellow

> marker delete #2

> marker segment #2 position 166.2,152.5,184.3 toPosition 157.8,152.4,185.7
> color yellow radius 0.1 label 8.603 labelHeight 0.8603 labelColor yellow

> ui mousemode right "move label"

> ui mousemode right "move label"

> ui mousemode right "tape measure"

> marker delete #2

> marker segment #2 position 157.1,161.1,186.5 toPosition 152.9,156.3,186.1
> color yellow radius 0.1 label 6.425 labelHeight 0.6425 labelColor yellow

> ui mousemode right "move label"

> label height 5

> label height 2

> undo

Traceback (most recent call last):  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/undo.py", line 185, in undo  
inst.undo()  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/undo.py", line 388, in undo  
self._update_owner(owner, attribute, old_value, option)  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/undo.py", line 417, in _update_owner  
setattr(owner, attribute, value)  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/graphics/drawing.py", line 243, in __setattr__  
super(Drawing, self).__setattr__(key, value)  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/models.py", line 309, in _set_display  
Drawing.set_display(self, display)  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/graphics/drawing.py", line 337, in set_display  
dp = self.display_positions  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/graphics/drawing.py", line 350, in get_display_positions  
dp = ones((len(self._positions),), bool)  
TypeError: object of type 'NoneType' has no len()  
  
undo failed: object of type 'NoneType' has no len():  
TypeError: object of type 'NoneType' has no len()  
  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/graphics/drawing.py", line 350, in get_display_positions  
dp = ones((len(self._positions),), bool)  
  
See log for complete Python traceback.  
  

> ui mousemode right "tape measure"

> marker delete #2

> marker segment #2 position 156.9,160.8,175.1 toPosition 153.8,157.2,175.1
> color yellow radius 0.1 label 4.806 labelHeight 0.4806 labelColor yellow

> marker delete #2

> marker segment #2 position 156.9,160.8,175.1 toPosition 154.1,156.8,175.7
> color yellow radius 0.1 label 4.981 labelHeight 0.4981 labelColor yellow

> ui mousemode right "move label"

> label height 2

> ui mousemode right "tape measure"

> marker delete #2

> ui mousemode right "tape measure"

> marker segment #2 position 157.1,161.1,186.5 toPosition 153.3,156.1,186.2
> color yellow radius 0.1 label 6.311 labelHeight 0.6311 labelColor yellow

> label height 2

> ui mousemode right "move label"

> ui mousemode right "tape measure"

> marker delete #2

> marker segment #2 position 176.8,170.2,130.5 toPosition 175,172.9,149.4
> color yellow radius 0.1 label 19.23 labelHeight 1.923 labelColor yellow

> marker delete #2

> marker segment #2 position 137.8,157.8,135.5 toPosition 136.4,160.6,147.6
> color yellow radius 0.1 label 12.52 labelHeight 1.252 labelColor yellow

> marker delete #2

> ui mousemode right distance

> ui mousemode right distance

> ui mousemode right select

> select /C:159

9 atoms, 8 bonds, 1 model selected  

> select /D:628

8 atoms, 7 bonds, 1 model selected  

> select /C:158

8 atoms, 7 bonds, 1 model selected  

> select /C:158

8 atoms, 7 bonds, 1 model selected  
Drag select of 46 residues  
Drag select of 6 residues  
Drag select of 8 residues  
Drag select of 8 residues  

> select clear

> ui mousemode right "next docked"

> ui mousemode right "next docked"

> ui mousemode right "next docked"

> ui mousemode right zone

> ui mousemode right zone

> ui mousemode right zone

> ui mousemode right select

Drag select of 823 residues  

> select clear

> select clear

> ui mousemode right select

Drag select of 1021 residues  

> ui mousemode right zone

> zone /D:649

> zone label false

> zone /D:649 residueDistance 3.82 labelDistance 3.06 surfaceDistance 6.12

> zone /D:649 residueDistance 2.8 labelDistance 2.24 surfaceDistance 4.48

> zone /D:649 residueDistance 1.2 labelDistance 0.963 surfaceDistance 1.93

> zone label false

> zone /D:649 residueDistance 0.921 labelDistance 0.737 surfaceDistance 1.47

> zone /D:649 residueDistance 0.708 labelDistance 0.567 surfaceDistance 1.13

> zone /B:658

> zone label false

> zone /B:658 residueDistance 0.544 labelDistance 0.435 surfaceDistance 0.871

> zone /B:658 residueDistance 0.418 labelDistance 0.335 surfaceDistance 0.669

> zone /B:658 residueDistance 0.308 labelDistance 0.247 surfaceDistance 0.493

> zone /D:642

> zone /D:649

> zone /B:646

> zone label false

> zone /D:645

> zone label false

> zone /D:645 residueDistance 0.235 labelDistance 0.188 surfaceDistance 0.376

> zone /D:645 residueDistance 0.151 labelDistance 0.121 surfaceDistance 0.241

> zone /D:645 residueDistance 0.116 labelDistance 0.0928 surfaceDistance 0.186

> ui mousemode right zone

> ui mousemode right clip

> ui mousemode right clip

> ui mousemode right clip

> ui mousemode right clip

> ui mousemode right clip

> ui mousemode right zone

> zone /D:653

> ui mousemode right clip

> ui mousemode right zone

> zone label false

> ui mousemode right label

> label #1/B:646

> label delete residues

> label #1/D:642

> label #1/D:653

> label delete residues

> label #1/D:653

> label #1/B:653

> label #1/D:653

> ui mousemode right zone

> zone /D:653

> zone /D:656

> zone /D:642

> zone /D:645

> zone /D:646

> zone /D:649

> ui mousemode right zone

> ui mousemode right zone

> select clear

> select

21756 atoms, 22364 bonds, 2 models selected  

> select clear

> zone label false

> zone clear

Alignment identifier is 1  
Alignment identifier is 2  

> interfaces ~solvent

3 buried areas: B A 1042, D C 864, B D 738  

> undo

Traceback (most recent call last):  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/undo.py", line 185, in undo  
inst.undo()  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/undo.py", line 388, in undo  
self._update_owner(owner, attribute, old_value, option)  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/undo.py", line 419, in _update_owner  
getattr(owner, attribute)(value)  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/models.py", line 200, in set_selected  
Drawing.set_highlighted(self, sel)  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/graphics/drawing.py", line 392, in set_highlighted  
self._highlighted_positions = ones(len(self.positions), bool)  
TypeError: object of type 'NoneType' has no len()  
  
undo failed: object of type 'NoneType' has no len():  
TypeError: object of type 'NoneType' has no len()  
  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/graphics/drawing.py", line 392, in set_highlighted  
self._highlighted_positions = ones(len(self.positions), bool)  
  
See log for complete Python traceback.  
  

> undo

Traceback (most recent call last):  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/undo.py", line 185, in undo  
inst.undo()  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/undo.py", line 388, in undo  
self._update_owner(owner, attribute, old_value, option)  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/undo.py", line 417, in _update_owner  
setattr(owner, attribute, value)  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/graphics/drawing.py", line 243, in __setattr__  
super(Drawing, self).__setattr__(key, value)  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/models.py", line 202, in set_selected  
self._selection_changed()  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/models.py", line 206, in _selection_changed  
self.session.ui.thread_safe(self.session.triggers.activate_trigger,  
AttributeError: 'NoneType' object has no attribute 'ui'  
  
undo failed: 'NoneType' object has no attribute 'ui':  
AttributeError: 'NoneType' object has no attribute 'ui'  
  
File
"/Applications/ChimeraX-1.0.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-
packages/chimerax/core/models.py", line 206, in _selection_changed  
self.session.ui.thread_safe(self.session.triggers.activate_trigger,  
  
See log for complete Python traceback.  
  




OpenGL version: 4.1 INTEL-14.6.18
OpenGL renderer: Intel Iris OpenGL Engine
OpenGL vendor: Intel Inc.Hardware:

    Hardware Overview:

      Model Name: Mac mini
      Model Identifier: Macmini7,1
      Processor Name: Dual-Core Intel Core i5
      Processor Speed: 2.6 GHz
      Number of Processors: 1
      Total Number of Cores: 2
      L2 Cache (per Core): 256 KB
      L3 Cache: 3 MB
      Hyper-Threading Technology: Enabled
      Memory: 16 GB
      Boot ROM Version: 248.0.0.0.0
      SMC Version (system): 2.24f32

Software:

    System Software Overview:

      System Version: macOS 10.15.5 (19F101)
      Kernel Version: Darwin 19.5.0
      Time since boot: 7 days 14:59

Graphics/Displays:

    Intel Iris:

      Chipset Model: Intel Iris
      Type: GPU
      Bus: Built-In
      VRAM (Dynamic, Max): 1536 MB
      Vendor: Intel
      Device ID: 0x0a2e
      Revision ID: 0x0009
      Metal: Supported, feature set macOS GPUFamily1 v4
      Displays:
        DELL U3014:
          Resolution: 2560 x 1600
          UI Looks like: 2560 x 1600 @ 60 Hz
          Framebuffer Depth: 24-Bit Color (ARGB8888)
          Display Serial Number: J3Y9N63G634L
          Main Display: Yes
          Mirror: Off
          Online: Yes
          Rotation: Supported
          Automatically Adjust Brightness: No

PyQt version: 5.12.3
Compiled Qt version: 5.12.4
Runtime Qt version: 5.12.8

Attachments (1)

undo.py (16.5 KB ) - added by Eric Pettersen 5 years ago.
has deleted_check code

Download all attachments as: .zip

Change History (9)

comment:1 by Eric Pettersen, 5 years ago

Cc: Conrad Huang added
Component: UnassignedUndo/Redo
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionDuring undo, self._positions is None

comment:2 by Tom Goddard, 5 years ago

Hiding a model, then closing it, then trying to undo the hide produces this error. Need to protect against undo actions on closed models.

comment:3 by Tom Goddard, 5 years ago

Cc: chimera-programmers added; Conrad Huang removed

The user hid a model, closed the model, then tried to undo the hide, producing a confusing traceback.

Where in the code should we catch undo operations on closed models? I am soliciting opinions from Conrad, Eric and Greg. Maybe some code already does this.

In this case in std_commands/src/show.py the undo state is saved using

undo_state.add(m, "display", m.display, True)

That is very simple but leaves it to the undo code to reset the value of the m.display attribute which leads to an error when the model is closed. There are quite a lot of attributes of Model handled with undo this way. We could have the undo go specifically look for Model and check Model.deleted. Or the undo code could just look at whatever object it is about to set an attribute and if it has a "deleted" property that is True then don't set the attribute. Or the hardest to implement because it effects code in many places is change how the undo state for model changes is saved and put checking code in the code that is registering the undo operation.

comment:4 by Eric Pettersen, 5 years ago

It could be an optional keyword argument to undo_state.add() that defaults to looking for and checking a 'deleted' property of the object.

by Eric Pettersen, 5 years ago

Attachment: undo.py added

has deleted_check code

comment:5 by Eric Pettersen, 5 years ago

I've attached a version of undo.py that has the code I suggested in it. It does fix the problem. The _consistency_check() routine that was already in the code will catch this problem for Collections (since they change size as things get deleted), so the deleted check I put in for the 'S' (series) mode may not be necessary in all cases. The undo code could definitely be made more efficient for Collections, but since Collections are defined outside the core that is a bit of a sticky wicket.

Didn't document the deleted_check argument.

in reply to:  7 comment:6 by goddard@…, 5 years ago

How about you take this ticket and make your undo changes?  They sound reasonable to me.


comment:7 by Eric Pettersen, 5 years ago

Owner: changed from Tom Goddard to Eric Pettersen

comment:8 by Eric Pettersen, 5 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.