• EditorBugs
  • Facing Error while Importing Dragon Bones Json File in Spine Tool

I'm trying to import a JSON file exported from DragonBones into Spine (version 3.8.75 Professional), but I keep encountering an error that prevents the file from importing successfully.

Steps Taken:
JSON Adjustments: I’ve attempted to remove DragonBones-specific keys (e.g., "hull," "triangles," "uvs") to ensure Spine compatibility, but this didn’t resolve the issue.
Re-exported JSON: I re-exported the JSON from DragonBones, ensuring all settings were compatible, but the same import error persisted.
File Permissions: Verified all referenced assets are accessible, and file paths are correct.
System Information:

Spine Version: 4.2.37 Professional
DragonBones Export: JSON format
Operating System: Windows 10 Home
Graphics Card: NVIDIA GeForce RTX 3050
Questions:

Are there specific JSON keys or structures that DragonBones uses which Spine cannot interpret?
Is there a reliable conversion tool or method for adapting DragonBones JSON files specifically for Spine import?
Does anyone have experience successfully importing complex animations (like "attack") from DragonBones to Spine, and are there specific steps required?
Additional Info: If any further details are needed, such as JSON file structure or specific error logs, please let me know. Any assistance in resolving this compatibility issue would be greatly appreciated!

Attaching <Removed>
the Error Log file. Kindly help!

Thank You!

  • Misaki ha risposto a questo messaggio
    Related Discussions
    ...

    himanshuB42 Sorry, the license information contained in the spine.log file should have been deleted automatically, but the attached spine.log file left the license information as is, so I deleted it.
    The contents are transcribed below:.

    Spine Launcher 4.2.18
    Esoteric Software LLC (C) 2013-2024 | http://esotericsoftware.com
    Windows 10 Home Single Language amd64 10.0
    NVIDIA Corporation, NVIDIA GeForce RTX 3050 Laptop GPU/PCIe/SSE2, 4.6.0 NVIDIA 566.03
    Starting: Spine 4.2.37 Professional
    Spine 4.2.37 Professional
    Licensed to: <removed>
    Started.
    OpenAL 1.1, Default audio device
    ERROR: Error importing skeleton data file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Normal With Knife\Charater 1\New folder\hero-normal-char-1-with-two-knives.json
    Please enter a Spine JSON or binary data file.
    [error] Error reading file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Normal With Knife\Charater 1\New folder\hero-normal-char-1-with-two-knives.json
       at s.aab._(_:197)
       at s.vSr._(_:408)
       at s.vSr.I(_:378)
       at s.vSr.S(_:307)
       at s.vSr._(_:311)
       at s.oqO._(_:1086)
       at s.QyZ.I(_:486)
       at s.CWm._(_:589)
       at s.yKp._(_:611)
       at s.wYJ._(_:65)
       at s.ilO._(_:98)
       at s.FYv._(_:47)
       at s.Tan._(_:186)
       at s.FYv._(_:50)
       at s.PrA._(_:211)
       at s.PrA.I(_:186)
       at s.CWm.Z(_:1056)
       at s.yLU.F(_:500)
       at s.DIO.run(_:259)
       <events>
    Cause: s.Ser: Error reading animation: idle
       at s.DSi._(_:414)
       at s.OsB._(_:118)
       at s.aab._(_:168) ...
    Cause: [error] Invalid curve.
       at s.OsB._(_:163)
       at s.DSi._(_:1161)
       at s.DSi._(_:790)
       at s.DSi._(_:412) ...
    Cause: [npe] Cannot invoke "s.mei._()" because the return value of "s.mei._(int)" is null
       at s.OsB._(_:155) ...
    ERROR: Error importing skeleton data file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Normal With Knife\Charater 1\New folder\hero-normal-char-1-with-two-knives.json
    Please enter a Spine JSON or binary data file.
    [error] Error reading file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Normal With Knife\Charater 1\New folder\hero-normal-char-1-with-two-knives.json
       at s.aab._(_:197)
       at s.vSr._(_:408)
       at s.vSr.I(_:378)
       at s.vSr.S(_:307)
       at s.vSr._(_:311)
       at s.CWm._(_:1101)
       at s.vSr.I(_:310)
       at s.Tan.F(_:444)
       at s.eCr._(_:91)
       at s.yGd._(_:28)
       at s.ilO._(_:188)
       at s.ilO._(_:158)
       at com.badlogic.gdx.scenes.scene2d.ui.Button.F(_:125)
       at s.GNO._(_:93)
       at s.Tao._(_:88)
       at s.qqd._(_:71)
       at s.PrA.F(_:354)
       at s.SHC.F(_:124)
       at s.nBZ.F(_:104)
       at s.FqY._(_:46)
       at s.nBZ._(_:35)
       at s.DIO.run(_:251)
       <events>
    Cause: s.Ser: Error reading animation: idle
       at s.DSi._(_:414)
       at s.OsB._(_:118)
       at s.aab._(_:168) ...
    Cause: [error] Invalid curve.
       at s.OsB._(_:163)
       at s.DSi._(_:1161)
       at s.DSi._(_:790)
       at s.DSi._(_:412) ...
    Cause: [npe] Cannot invoke "s.mei._()" because the return value of "s.mei._(int)" is null
       at s.OsB._(_:155) ...
    ERROR: Error importing skeleton data file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Normal With Knife\Charater 2\New folder\hero-normal-char-2-with-knives.json
    Please enter a Spine JSON or binary data file.
    [error] Error reading file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Normal With Knife\Charater 2\New folder\hero-normal-char-2-with-knives.json
       at s.aab._(_:197)
       at s.vSr._(_:408)
       at s.vSr.I(_:378)
       at s.vSr.S(_:307)
       at s.vSr._(_:311)
       at s.CWm._(_:1101)
       at s.vSr.I(_:310)
       at s.Tan.F(_:444)
       at s.eCr._(_:91)
       at s.yGd._(_:28)
       at s.ilO._(_:188)
       at s.ilO._(_:158)
       at com.badlogic.gdx.scenes.scene2d.ui.Button.F(_:125)
       at s.GNO._(_:93)
       at s.Tao._(_:88)
       at s.qqd._(_:71)
       at s.PrA.F(_:354)
       at s.SHC.F(_:124)
       at s.nBZ.F(_:104)
       at s.FqY._(_:46)
       at s.nBZ._(_:35)
       at s.DIO.run(_:251)
       <events>
    Cause: s.Ser: Error reading animation: attack
       at s.DSi._(_:414)
       at s.OsB._(_:118)
       at s.aab._(_:168) ...
    Cause: [error] Invalid curve.
       at s.OsB._(_:163)
       at s.DSi._(_:1161)
       at s.DSi._(_:790)
       at s.DSi._(_:412) ...
    Cause: [npe] Cannot invoke "s.mei._()" because the return value of "s.mei._(int)" is null
       at s.OsB._(_:155) ...
    ERROR: Error importing skeleton data file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Normal With Knife\Charater 3\New folder\hero-normal-char-3-with-knives.json
    Please enter a Spine JSON or binary data file.
    [error] Error reading file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Normal With Knife\Charater 3\New folder\hero-normal-char-3-with-knives.json
       at s.aab._(_:197)
       at s.vSr._(_:408)
       at s.vSr.I(_:378)
       at s.vSr.S(_:307)
       at s.vSr._(_:311)
       at s.CWm._(_:1101)
       at s.vSr.I(_:310)
       at s.Tan.F(_:444)
       at s.eCr._(_:91)
       at s.yGd._(_:28)
       at s.ilO._(_:188)
       at s.ilO._(_:158)
       at com.badlogic.gdx.scenes.scene2d.ui.Button.F(_:125)
       at s.GNO._(_:93)
       at s.Tao._(_:88)
       at s.qqd._(_:71)
       at s.PrA.F(_:354)
       at s.SHC.F(_:124)
       at s.nBZ.F(_:104)
       at s.FqY._(_:46)
       at s.nBZ._(_:35)
       at s.DIO.run(_:251)
       <events>
    Cause: s.Ser: Error reading animation: attack
       at s.DSi._(_:414)
       at s.OsB._(_:118)
       at s.aab._(_:168) ...
    Cause: [error] Invalid curve.
       at s.OsB._(_:163)
       at s.DSi._(_:1161)
       at s.DSi._(_:790)
       at s.DSi._(_:412) ...
    Cause: [npe] Cannot invoke "s.mei._()" because the return value of "s.mei._(int)" is null
       at s.OsB._(_:155) ...
    ERROR: Error importing skeleton data file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Premium With Gun\Character 1 Merged\New folder\hero-premium-char-1-with-guns.json
    Please enter a Spine JSON or binary data file.
    [error] Error reading file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Premium With Gun\Character 1 Merged\New folder\hero-premium-char-1-with-guns.json
       at s.aab._(_:197)
       at s.vSr._(_:408)
       at s.vSr.I(_:378)
       at s.vSr.S(_:307)
       at s.vSr._(_:311)
       at s.CWm._(_:1101)
       at s.vSr.I(_:310)
       at s.Tan.F(_:444)
       at s.eCr._(_:91)
       at s.yGd._(_:28)
       at s.ilO._(_:188)
       at s.ilO._(_:158)
       at com.badlogic.gdx.scenes.scene2d.ui.Button.F(_:125)
       at s.GNO._(_:93)
       at s.Tao._(_:88)
       at s.qqd._(_:71)
       at s.PrA.F(_:354)
       at s.SHC.F(_:124)
       at s.nBZ.F(_:104)
       at s.FqY._(_:46)
       at s.nBZ._(_:35)
       at s.DIO.run(_:251)
       <events>
    Cause: s.Ser: Error reading animation: shoot
       at s.DSi._(_:414)
       at s.OsB._(_:118)
       at s.aab._(_:168) ...
    Cause: [error] Invalid curve.
       at s.OsB._(_:163)
       at s.DSi._(_:1161)
       at s.DSi._(_:790)
       at s.DSi._(_:412) ...
    Cause: [npe] Cannot invoke "s.mei._()" because the return value of "s.mei._(int)" is null
       at s.OsB._(_:155) ...
    ERROR: Error importing skeleton data file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Normal With Knife\Charater 1\New folder\hero-normal-char-1-with-two-knives.json
    Please enter a Spine JSON or binary data file.
    [error] Error reading file: G:\Other computers\Himanshu Legion\Gamezop\Games\Art Design\Wild West Hunt\New Version\Production\Animation\Spine\Hero Normal With Knife\Charater 1\New folder\hero-normal-char-1-with-two-knives.json
       at s.aab._(_:197)
       at s.vSr._(_:408)
       at s.vSr.I(_:378)
       at s.vSr.S(_:307)
       at s.vSr._(_:311)
       at s.CWm._(_:1101)
       at s.vSr.I(_:310)
       at s.Tan.F(_:444)
       at s.eCr._(_:91)
       at s.yGd._(_:28)
       at s.ilO._(_:188)
       at s.ilO._(_:158)
       at com.badlogic.gdx.scenes.scene2d.ui.Button.F(_:125)
       at s.GNO._(_:93)
       at s.Tao._(_:88)
       at s.qqd._(_:71)
       at s.PrA.F(_:354)
       at s.SHC.F(_:124)
       at s.nBZ.F(_:104)
       at s.FqY._(_:46)
       at s.nBZ._(_:35)
       at s.DIO.run(_:251)
       <events>
    Cause: s.Ser: Error reading animation: idle
       at s.DSi._(_:414)
       at s.OsB._(_:118)
       at s.aab._(_:168) ...
    Cause: [error] Invalid curve.
       at s.OsB._(_:163)
       at s.DSi._(_:1161)
       at s.DSi._(_:790)
       at s.DSi._(_:412) ...
    Cause: [npe] Cannot invoke "s.mei._()" because the return value of "s.mei._(int)" is null
       at s.OsB._(_:155) ...

    We are not familiar with the DragonBones export format and cannot provide support for it, but at least if it is exported in the 3.8.75 format, you should import it with Spine 3.8.75. It cannot be imported directly into 4.2.37.
    First do the import in 3.8.75, then save the Spine project and open the saved project in 4.2.37. This will allow you to update the skeleton version.

      Misaki
      Thanks for the update, I did not aware about attaching log file.
      I perform the steps which you provided. But issue is not resolved. Still appearing error popup.

      • Misaki ha risposto a questo messaggio

        himanshuB42 I see. The message means that it does not recognize you as having entered a Spine JSON file in the first place, so it is not possible for us to know the cause without seeing the actual JSON file. Can you email us the JSON that you can't import?: contact@esotericsoftware.com

          himanshuB42 Thank you for sending the JSON file! It seems that the problem is only with the draw order timeline of the attack animation. I have sent you an email with the modified JSON attached, please check it.

          Thank You so much Misaki,
          You are great. :-)
          The issue has been resolved. I have a lot of Dragon Bones animations which need to be imported into Spine. So can you tell me what you have fixed? So that if there is an error in all other json files then I can fix it myself.

          Thank you and Regards!

          • Misaki ha risposto a questo messaggio

            himanshuB42 Glad to hear the problem has been resolved!
            What I did was simply delete the drawOrder information of the attack animation. This means that the following has been deleted:

            "drawOrder":[{"time":0,"offsets":[{"slot":"knife-blank-placeholder-right","offset":-3}]}]},

            It is not clear why this line was actually a problem, as the written content itself appears to follow the correct format.

            The process I tried was a completely manual way of checking things:
            When I looked at the JSON file you sent us, it seemed to follow the Spine JSON export format correctly overall, and the only error in the spine.log file was reading the animations, so I assumed there was only something wrong with the animations. So I tried to see if I could delete the animations information and import it, and it worked, so I deleted some of the animation information and tried to import it. Then I realised that the import only didn't work when the data of the attack animation was included, and when I checked the difference with the other animations, I found that only this animation had a drawOrder timeline, so I tried deleting it and the import was successful.

            It may not be suitable for checking large numbers of files, but if the import doesn't seem to work with other files that contain drawOrder timelines, you may want to delete them on DragonBones and reconfigure them on Spine. I hope this helps!

              Misaki
              Hi Misaki,

              Thank you so much for your detailed explanation and guidance. I appreciate the time and effort you took to manually go through the JSON file and identify the root of the issue. Your approach of isolating the animation data and pinpointing the drawOrder timeline in the attack animation was incredibly helpful.

              I’ll keep your advice in mind for future imports, especially regarding files with drawOrder timelines. Knowing that this could be a recurring factor gives me a clearer troubleshooting path moving forward.

              Thanks once again for your invaluable support and for helping resolve this quickly!

              Best regards,
              Himanshu