Couldn't connect to trainer on port 5004 using API version 1.5.0. Will perform inference instead. (908495)

Hey guys, i have been recently trying to setup ML agents.
After following every step in: ml-agents/docs/Installation.md at develop · Unity-Technologies/ml-agents · GitHub
and proceeding to setup i got to a problem where after using mlagents-learn in command prompt and pressing the play button i get:


i searched System.IO.IOException: Error loading native library and in: System.IO.IOException: Error loading native library "C:\Users\Administrator\Desktop\servers\server1\grpc_csharp_ext.x64.dll". when runs at x64 · Issue #21550 · grpc/grpc · GitHub i didnt find anything usefull, does anyone have an idea what may have caused this?

‘error loading native library’ means that it’s unable to load the mlagents plugin dll.

You don’t need to look into the c# code, or your inspector, since the mlagents plugin dll didnt even load, so won’t get as far as looking at those.

The issue is more likely to revolve around some kind of incompatibility between the plugin dll and your system.

What kind of system are you running? I’m going to guess it’s a Silicon Mac? Which is not to say that mlagents won’t work on a silicon mac, cos I have one. I’m going to guess the native library that fails to load is: google protobuf native library. It’s often a little precocious…

The plugins are all in your packages/mlagents folder:

You’ll want to go through each of these, and ensure they’re loading ok.

If you’re on silicon, … hmmm… weirdly I have a ton of these set to intel x86, which seems odd. But I reckon the one that is likely crashing is grpc native. You should have the following I feel:

Hey thanks for answering, turns it was probably because my user folder name contained non ascii characters, after renaming it and doing factory restart and doing the whole installation again it works now!

Great! :slight_smile:

Hello, I’m having the same issue. Do you know what character it was in the directory?
Thanks.

One thing I found, that could help others: ML Training in build won’t work if you try to use IL2CPP compiler. So, make sure your project is set to Mono.

OMG you are such a lifesaver. I got suck on this issue for so long

hi may i know how u modify the inspector? mine is grey and unselectable

I want to take part in the discussion.

The solution to the problem was to change the folder, because the name had “Cyrillic”. It helped to change the folder

Решение проблемы стало изменение папки, ведь в названии была “кириллица”. Помогло сменить папку.

bro you save my day

Thank you so much you have saved my day and finally I got this thing working!
I changed all the Platform settings in Plugin folder (and all the subfolders) and then found out I missed a few of them. They are hiding somewhere like this: