Difference between revisions of "AttributeError: NoneType object has no attribute"

From Gramps
Jump to: navigation, search
m
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The error "AttributeError: 'NoneType' object has no attribute..." probably means  that you attempted to retrieve an object (such as a person, or family) by using its internal handle, but the database can't find it. Likely, the object is still there, but the internal database references have gotten corrupted.
+
The Python error '''"AttributeError: 'NoneType' object has no attribute..."''' probably means  that the Gramps program attempted to retrieve an object (such as a person, or family) by using its internal handle, but the database can't find it. Likely, the object is still there, but the internal database references have become corrupted.
  
To fix, first, make a Gramps XML backup.  
+
To attempt to fix this issue, first, '''[[How_to_make_a_backup|make a Gramps XML backup]]'''.
  
Then, you need to run the menu -> Tools -> Family Tree Repair and run the tools:
+
Then, you need to run the following tools from the menu {{man menu|Tools -> Family Tree Repair}} in the listed order:
  
# Check and Repair Database
+
# {{man menu|[[Gramps_4.1_Wiki_Manual_-_Tools#Check_and_Repair_Database|Check and Repair Database]]}}
# Rebuild Reference Maps
+
# {{man menu|[[Gramps_4.1_Wiki_Manual_-_Tools#Rebuild_Reference_Maps|Rebuild Reference Maps]]}}
# Rebuild Secondary Indices
+
# {{man menu|[[Gramps_4.1_Wiki_Manual_-_Tools#Rebuild_Secondary_Indexes|Rebuild Secondary Indices]]}}
  
in that order.  
+
If you still get the error after running the repair tools, then you should try creating a new family tree, and importing your backup. If errors still occur, try running the above tools on the re-imported tree.
  
If you still get the error after running the repair tools, then you should try creating a new family tree, and importing your backup. If still errors, try running the above tools on the re-imported tree.
+
If you still have issues, you may need to go back to an older backup.
  
If you still have issues, you may need to go back to an older backup.
+
==See also==
 +
* [[Known issues]]
  
[[Category:Documentation]][[Category:Developers]]
+
[[Category:Documentation]]
 +
[[Category:Developers]]
 +
[[Category:Troubleshooting]]

Latest revision as of 22:38, 28 July 2015

The Python error "AttributeError: 'NoneType' object has no attribute..." probably means that the Gramps program attempted to retrieve an object (such as a person, or family) by using its internal handle, but the database can't find it. Likely, the object is still there, but the internal database references have become corrupted.

To attempt to fix this issue, first, make a Gramps XML backup.

Then, you need to run the following tools from the menu Tools -> Family Tree Repair in the listed order:

  1. Check and Repair Database
  2. Rebuild Reference Maps
  3. Rebuild Secondary Indices

If you still get the error after running the repair tools, then you should try creating a new family tree, and importing your backup. If errors still occur, try running the above tools on the re-imported tree.

If you still have issues, you may need to go back to an older backup.

See also