EhWhoAmI / Conquer-Space

Conquer Space!
GNU Affero General Public License v3.0
3 stars 0 forks source link

Python script not working #3

Closed EhWhoAmI closed 6 years ago

EhWhoAmI commented 6 years ago

    civ.setHomeplanetPath(HomesectorID, start[0], start[1])
TypeError: 'NoneType' object is unsubscriptable

org.python.core.PyException: null
    at org.python.core.Py.TypeError(Py.java:259) ~[jython-standalone-2.7.0.jar:?]
    at org.python.core.PyObject.__finditem__(PyObject.java:668) ~[jython-standalone-2.7.0.jar:?]
    at org.python.core.PyObject.__getitem__(PyObject.java:736) ~[jython-standalone-2.7.0.jar:?]
    at org.python.pycode._pyx0.f$0(C:\Users\21zlam\Source\Repos\conquer-space2/assets/scripts/universeGen/main.py:214) ~[?:?]
    at org.python.pycode._pyx0.call_function(C:\Users\21zlam\Source\Repos\conquer-space2/assets/scripts/universeGen/main.py) ~[?:?]
    at org.python.core.PyTableCode.call(PyTableCode.java:167) ~[jython-standalone-2.7.0.jar:?]
    at org.python.core.PyCode.call(PyCode.java:18) ~[jython-standalone-2.7.0.jar:?]
    at org.python.core.Py.runCode(Py.java:1386) ~[jython-standalone-2.7.0.jar:?]
    at org.python.core.__builtin__.execfile_flags(__builtin__.java:535) ~[jython-standalone-2.7.0.jar:?]
    at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:286) ~[jython-standalone-2.7.0.jar:?]
    at ConquerSpace.util.scripts.RunScript.exec(RunScript.java:34) ~[classes/:?]
    at ConquerSpace.start.gui.NewGame.actionPerformed(NewGame.java:235) [classes/:?]
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) [?:1.8.0_131]
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) [?:1.8.0_131]
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) [?:1.8.0_131]
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) [?:1.8.0_131]
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) [?:1.8.0_131]
    at java.awt.Component.processMouseEvent(Component.java:6533) [?:1.8.0_131]
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) [?:1.8.0_131]
    at java.awt.Component.processEvent(Component.java:6298) [?:1.8.0_131]
    at java.awt.Container.processEvent(Container.java:2236) [?:1.8.0_131]
    at java.awt.Component.dispatchEventImpl(Component.java:4889) [?:1.8.0_131]
    at java.awt.Container.dispatchEventImpl(Container.java:2294) [?:1.8.0_131]
    at java.awt.Component.dispatchEvent(Component.java:4711) [?:1.8.0_131]
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) [?:1.8.0_131]
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) [?:1.8.0_131]
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) [?:1.8.0_131]
    at java.awt.Container.dispatchEventImpl(Container.java:2280) [?:1.8.0_131]
    at java.awt.Window.dispatchEventImpl(Window.java:2746) [?:1.8.0_131]
    at java.awt.Component.dispatchEvent(Component.java:4711) [?:1.8.0_131]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) [?:1.8.0_131]
    at java.awt.EventQueue.access$500(EventQueue.java:97) [?:1.8.0_131]
    at java.awt.EventQueue$3.run(EventQueue.java:709) [?:1.8.0_131]
    at java.awt.EventQueue$3.run(EventQueue.java:703) [?:1.8.0_131]
    at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_131]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) [?:1.8.0_131]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) [?:1.8.0_131]
    at java.awt.EventQueue$4.run(EventQueue.java:731) [?:1.8.0_131]
    at java.awt.EventQueue$4.run(EventQueue.java:729) [?:1.8.0_131]
    at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_131]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) [?:1.8.0_131]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_131]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_131]```

probally because there are no suitable systems remaining in that sector
EhWhoAmI commented 6 years ago

Will try to fix with a loop back.

EhWhoAmI commented 6 years ago

Fixed with commit e3b4643