Can't launch vessels in 0.4.6 - method DefaultCrewForVessel not found
jimbofreedman opened this issue ยท 4 comments
I've just revisited kRPC and I'm struggling to launch vessels. I'm in the Flight scene (on the runway).
>>> import krpc
>>> conn = krpc.connect("blah")
>>> sc = conn.space_center
>>> vessel = sc.launchable_vessels("vab")[0]
>>> sc.launch_vessel_from_vab(vessel)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 1, in <lambda>
File "/Users/jimbo/.virtualenvs/kerbal/lib/python3.6/site-packages/krpc/client.py", line 140, in _invoke
raise self._build_error(response.results[0].error)
krpc.error.RPCError: Method not found: 'KerbalRoster.DefaultCrewForVessel'.
Server stack trace:
at KRPC.SpaceCenter.Services.SpaceCenter.LaunchVessel (System.String craftDirectory, System.String name, System.String launchSite, Boolean recover) [0x00000] in <filename unknown>:0
at KRPC.SpaceCenter.Services.SpaceCenter.LaunchVesselFromVAB (System.String name, Boolean recover) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
I feel like kRPC wouldn't build if this method didn't exist, but I think I'm using the right versions - has anyone else experienced this?
I encounter the same error with the 0.4.6 release on Windows/python 2.7. When I tried rebuilding from source, it did complete the build, but produced a different error at runtime.
>>> import krpc
>>> conn = krpc.connect(name="launch")
>>> conn.space_center.launchable_vessels('VAB')
[u'1', u'Auto-Saved Ship']
>>> conn.space_center.launch_vessel_from_vab('1')
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
conn.space_center.launch_vessel_from_vab('1')
File "<string>", line 1, in <lambda>
File "C:\Program Files (x86)\Python27\lib\site-packages\krpc\client.py", line 136, in _invoke
raise self._build_error(response.error)
RPCError: Object reference not set to an instance of an object
Server stack trace:
at KRPC.Utils.Compatibility.NewLaunchSiteClear (System.String launchSite, .Game game) [0x00000] in <filename unknown>:0
at KRPC.SpaceCenter.Services.SpaceCenter.WaitForVesselPreFlightComplete (KRPC.SpaceCenter.Services.LaunchConfig config) [0x00000] in <filename unknown>:0
at KRPC.Continuations.ParameterizedContinuationVoid`1[KRPC.SpaceCenter.Services.SpaceCenter+LaunchConfig].Run () [0x00000] in <filename unknown>:0
at KRPC.Continuations.Continuation.RunUntyped () [0x00000] in <filename unknown>:0
at KRPC.Service.Services.ExecuteCall (KRPC.Service.Scanner.ProcedureSignature procedure, IContinuation continuation) [0x00000] in <filename unknown>:0
As far as I can tell, both errors are related to the new vessel launch code. If the vessel launch functions are a must-have for you, the 0.4.5 release should work, just be wary of #469.
Thanks for the tip - I'll downgrade for now. Hopefully sometime soon I'll get involved!
I just committed a fix for the "Object reference not set to an instance of an object" error that @ucfranger found.
As for the first issue, I can reproduce the error using the dll from the github v0.4.6 release page, but not when building from the source for v0.4.6! Very odd, and not sure how to go about debugging as I can't modify the source to investigate.