setting.json can not be changed(be rewritten everytime) SOLVED.
The path of the setting.json is C:\Users\chen9\OneDrive\文档\AirSim.
win10 Home
vs2015 pro3
The problem is only produced in my laptop. My desktop is fine. No matter what I change in setting.json, whenever I run the binary (for example AirsimNH), it would be written as default value like this:
Could anyone solve this problem?
I think this is probably happening due to asian characters in file path. Unfortunately we can't reproduce this issue on English versions. You can help s debug this, however. The relevant line of code is here:
https://github.com/Microsoft/AirSim/blob/7bddd5857791f9c164e8eba80c229f199c0babf8/Unreal/Plugins/AirSim/Source/SimHUD/SimHUD.cpp#L270
Thanks for your reply. I have found the solution. Because of the Asian characters in file path, just right click on the "Documents"-"Properties" - "Location" , you will find the path content Asian characters. Just modify it to English, click on "OK". Everything will be fine.
There might be side effect to this because you are renaming you document folder. For example, other applications which has set its path to location before you renamed might not work properly.
This is the path of my settings.json C:\Users\risheng\Documents\AirSim. Still the problem exists.
The Users folder is currently showing 用户, however it is Users when I check the path. I tried to change 用户 but it's a default folder and its name can't be changed.
Can you copy your path C:\Users\risheng\Documents\AirSim here and enter, check if the folder content settings?
It works, in fact I just changed the display language from Chinese to English so I suppose there shouldn't be any Chinese character in the path?
Yeah, chinese characters have caused errors reported in a few more issues as well. Let's stick to English. Closing this as it's resolved. please comment/re-open as needed.
I use English and still have the same issue my file part is: C:\Users\4567\Documents\AirSim
Please help!!!
copy your path C:\Users\4567\Documents\AirSim here and enter, check if the folder content settings?
Greek characters don't work too. That gives me an impression that all non Latin characters trigger this reset to the settings.json file. Path of settings.json file to simulate the problem was: C:\Users\example_user\Έγγραφα. Path of AirSim settings.json directory was C:\Users\example_user\Έγγραφα\AirSim\settings.json. The solution provided above applies for Greek characters, too.
Also, when you change the path of settings file, make sure to execute the environment of your choice (i.e. CityEnviron) with the executables under the "new" directory. Windows by default makes a copy of files, and some might think that they are calling the executable from the new directory. To be sure you are launching the environment of your choice from the new directory, use windows terminal, navigate in that directory, and execute start CityEnviron. You can also execute pwd (assuming you use powershell from windows terminal). pwd should return something like C:\Users\sample_user\Documents\My_Project\AirSim\Unreal\Environments\CityEnviron\WindowsNoEditor.
I also combined some powershell commands that can point out if you should have any concerns regarding the path of execution:
$temp = pwd
$temp -eq $temp -replace "[^a-zA-Z0-9.-\\ ]"
If the line above returns true then this could be a bug or false software setup, and if this is false, then there is still some chance that the issue could be the execution path.