AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

setting.json can not be changed(be rewritten everytime) SOLVED.

Open allen9273 opened this issue 8 years ago • 11 comments

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: image Could anyone solve this problem?

allen9273 avatar May 07 '18 05:05 allen9273

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

sytelus avatar May 08 '18 22:05 sytelus

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. 1 3

allen9273 avatar May 09 '18 05:05 allen9273

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.

sytelus avatar May 14 '18 20:05 sytelus

This is the path of my settings.json C:\Users\risheng\Documents\AirSim. Still the problem exists.

Beijingsheng avatar Aug 08 '18 07:08 Beijingsheng

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.

Beijingsheng avatar Aug 08 '18 07:08 Beijingsheng

image Can you copy your path C:\Users\risheng\Documents\AirSim here and enter, check if the folder content settings?

allen9273 avatar Aug 08 '18 08:08 allen9273

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?

Beijingsheng avatar Aug 08 '18 09:08 Beijingsheng

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.

madratman avatar Jan 23 '19 17:01 madratman

I use English and still have the same issue my file part is: C:\Users\4567\Documents\AirSim

Please help!!!

damilolah avatar Aug 16 '19 04:08 damilolah

image copy your path C:\Users\4567\Documents\AirSim here and enter, check if the folder content settings?

allen9273 avatar Aug 17 '19 01:08 allen9273

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.

AndreasKaratzas avatar May 16 '21 21:05 AndreasKaratzas