OpenToontownTools / OpenLevelEditor

An open sourced modernized version of Disney's in-house Toontown Online level editor used to create .dna files.
MIT License
58 stars 14 forks source link

Attempting to load any DNA produces "NoneType" error #39

Closed AutumnRivers closed 2 years ago

AutumnRivers commented 2 years ago

Describe the bug

I have a DNA file that I originally made in the editor, and I tried to load it in a few weeks later. When I did that, I got the following error:

Error: 1
AttributeError Exception in Tk callback
  Function: <function DNASerializer.loadSpecifiedDNAFile at 0x0000017554541790> (type: <class 'function'>)
  Args: ()
Traceback (innermost last):
  File "C:\Panda3D-1.11.0-Py39-x64\Pmw\Pmw_2_0_0\lib\PmwBase.py", line 1760, in __call__
    return self.func(*args)
  File "D:\OpenLevelEditor-master\toontown\leveleditor\DNASerializer.py", line 38, in loadSpecifiedDNAFile
    DNASerializer.loadDNAFromFile(dnaFilename)
  File "D:\OpenLevelEditor-master\toontown\leveleditor\DNASerializer.py", line 79, in loadDNAFromFile
    if node.getNumParents() == 1:
AttributeError: 'NoneType' object has no attribute 'getNumParents'

I can also prove that I have been making the DNA file with the editor, as I have screenshots of it in the editor: Screenshot 1 Screenshot 2 (Latest) I haven't touched this file since I last had it in the editor, so it shouldn't be an issue of corruption. Note: I just tested this with the tutorial_street.dna and toontown_central_2100.dna and have gotten the exact same error. This seems to be an issue with the DNA loader?

Edit: After creating this bug, I took a look at the command line and it seems that the DNA loader is having some syntax troubles:

Error in /d/OpenLevelEditor-master/leveleditor/hourglassprototype.dna at line 452, column 11:
  flat_door [
          ^
syntax error

This gets produced right before the "NoneType" error.

Reproduction Steps

  1. Use the latest version of OpenLevelEditor (1.1.16)
  2. Attempt to load a DNA file such as toontown_central_2100.dna or my attached DNA file.

Expected behavior

The editor should load the DNA file with no error, and I should be able to get right back where I left off.

Attachments

hourglassprototype.zip (.zip because GitHub doesn't support .dna) You can also use the toontown_central_2100.dna from open-toontown/resources.

System Info

Checklist

drewc5131 commented 2 years ago

Hi there, i wasn't notified of this issue so I never noticed. This is not support for issues with your DNA file. You just have a broken DNA file.

  1. The door thing, you should never have a flat door node on a landmark building.
  2. You didn't set up visgroups. The dna system relies on you setting everything up properly.

If you are trying to open the other dna files after you try loading yours, you cannot do that. Disney's DNA code includes an issue where if you load a broken DNA file, you can't load another one after that. This isn't going to be changed due to the fact that you will never be loading a dna file after the game crashes.

Futhermore, all properly made files load perfectly fine in my testing

AutumnRivers commented 2 years ago

Understood, thank you!