"Access none trying to read property" when

I was going through reinforced learning course from dev.epicgames.com, but I’m getting an error here:

Error is on the “Set Track Spline” box and it is the following error:

It’s strange for me because I’m calling this “Set” from promote to variable function just before.
The whole project compiles without errors, but I get this error when run and everything goes without errors until this part in the actor with LearningAgentsManager called LearningActor. I tried promoting again, creating trainer again from scratch (as Learning Trainer instead of Learning Agents Trainer [thus LearningTrainer1 and TrackSpline1, becuase LearningTrainer and TrackSpline are in the Leraning Agents Trainer]), searching for the solution on the web, but I couldn’t fix it. I hope someone can help me on this step.

Hey @Qbsoon!

Have you tried using the return value as target? It should be the same thing.
Or, using a “GET Trainer” node instead of pulling it off of set? I’ve noticed some strange behaviors pulling directly off of a set node before.

Honestly, that is all I’ve got without running the full course. I really hope that helps. :slight_smile:

I have already tried both before and sadly it gives the same error.

Hmm. Maybe try putting a short delay after the set trainer and before the set track spline? It’s definitely not set if it’s giving that error.

And just to be sure, there are NO other places on the event graph where you have a “Set Trackspline1” node? Even one that isn’t plugged in?

Hey @Qbsoon!

To add on a bit more, it could be due to the spline itself. If you add a “is valid” node from your spline reference with a branch does the spline show as valid?

@Mind-Brain 1. Delay didn’t work. 2. No, there are no other places.
@Quetzalcodename “Is valid” on “Spline” returns “valid”, “Is valid” on “Trainer” returns “Is not valid”

Interesting. Did you try doing an IsValid on the return value of “Make Trainer”?

All of this points to your “Make Trainer” function not doing what it’s supposed to. That being said… I have no idea what it’s supposed to make, obviously to create something. I suppose the “Trainer” variable is "Object of type ‘Learning Trainer’ "?

I think the answer is going to be there, within that function. If its return value is invalid, it is DEFINITELY within that function. Make sure all of your inputs are actually set, also!

Can you link to the tutorial you’re using and show us the inside of your function? Or is this a plugin of some kind? Is it from a C++ library?

@Mind-Brain The “Make Trainer” function is part of the Learning agent plugin.

Since the tutorial was made, there seem to be some changes regarding parts of the plugin.
The Policy base actor used to have an actor based component but for some reason in 5.4 it’s been re-parented as an extension of the uobject base class.

The new system requires function calls to build instances:

  • “Make Policy” to create a policy instance
  • “Make Critic” to create a critic
  • “Make Interactor” to create interactor

If the values in the screenshot are just promoted variables it will fail


This helped. I needed to connect them directly, no promoting to variables, and without sequence node, just gone from one make to another in series. Still had problems with movement, because using default movements from default actor (add movement input node) the actor was only rotating, not moving, but I created a temporary rough movement with “add actor offset” node for now.