Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpaceCenter API: vessel properties not available in all frames #528

Closed
swhinton opened this issue Jun 17, 2019 · 1 comment · Fixed by #530
Closed

SpaceCenter API: vessel properties not available in all frames #528

swhinton opened this issue Jun 17, 2019 · 1 comment · Fixed by #530
Labels
bug Something isn't working service:space-center
Milestone

Comments

@swhinton
Copy link

Problem Details

When in the space_center view, the properties of vessels in the list of vessels returned by the space_center.vessels API are not accessible. This is contrary to what the documentation specifies
https://krpc.github.io/krpc/python/api/space-center/space-center.html#SpaceCenter.vessels
https://krpc.github.io/krpc/python/api/space-center/vessel.html#SpaceCenter.Vessel.name

When a vessel property is read in the space_center game scene an exception is throw, e.g.
print(conn.space_center.vessels[0].name)

Will generate the following exception

File "/usr/local/lib/python3.6/dist-packages/krpc/client.py", line 163, in _invoke
    raise self._build_error(response.results[0].error)
krpc.error.RPCError: Object reference not set to an instance of an object
Server stack trace:
  at KRPC.SpaceCenter.FlightGlobalsExtensions.GetVesselById (Guid id) [0x00000] in <filename unknown>:0 
  at KRPC.SpaceCenter.Services.Vessel.get_InternalVessel () [0x00000] in <filename unknown>:0 
  at KRPC.SpaceCenter.Services.Vessel.get_Name () [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 

Configuration

KSP Version: 1.7.0
kRPC Version: 0.4.8
KSP Mods:

  • EVE
  • DistantObjectEnhancements
  • KerbalJointReinforcement
  • Kopernicus
  • MechJeb2
  • ModularFlightIntegrator
  • PlanetShine
  • Scatterer
  • Telemachus
  • TriggerTech
  • ModuleManager (3.0.7 and 4.0.2)
@JonnyOThan
Copy link
Contributor

fixed here: #530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working service:space-center
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants