unrealcv/unrealcv

Can't Build for UE4.27

jlcd opened this issue · 1 comments

jlcd commented
  • Operating System: Windows 11 (on WSL2 Ubuntu 20.04)
  • UE4 Version: 4.27
  • UnrealCV Version: branch 4.27
  • Client (python2, 3 or matlab): python3
  • Problem Description: can't run build.py, see output below

at first, I ran build.py and got the following error from automation.py:

$ python build.py  --UE4 "/mnt/c/Program\ Files/Epic\ Games/UE_4.27/"
Can not found UAT script in the engine folder /mnt/c/Program\ Files/Epic\ Games/UE_4.27/
Traceback (most recent call last):
  File "build.py", line 68, in <module>
    main()
  File "build.py", line 53, in main
    ue4.build_plugin(abs_descriptor_file, abs_output_folder, args.overwrite)
  File "[...]/ue/pvue/lib/python3.8/site-packages/unrealcv/automation.py", line 65, in build_plugin
    subprocess.call([
  File "/usr/lib/python3.8/subprocess.py", line 340, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/c/Program\\ Files/Epic\\ Games/UE_4.27/Engine/Build/BatchFiles/RunUAT.sh'

then I added shell=True to line 70 (inside subprocess.call) and it was able to rund RunUAT.sh, but then got the following error:

$ python build.py  --UE4 "/mnt/c/Program\ Files/Epic\ Games/UE_4.27/"
Can not found UAT script in the engine folder /mnt/c/Program\ Files/Epic\ Games/UE_4.27/

Running AutomationTool...

/mnt/c/Program Files/Epic Games/UE_4.27/Engine/Build/BatchFiles/RunUAT.sh: line 65: /mnt/c/Program Files/Epic Games/UE_4.27/Engine/Build/BatchFiles/Linux/SetupEnvironment.sh: No such file or directory
Start UAT: mono AutomationTool.exe
Parsing command line:
ERROR: Failed to find scripts to execute in the command line params.
AutomationTool exiting with ExitCode=1 (Error_Unknown)
RunUAT ERROR: AutomationTool was unable to run successfully.

I could also notice that the Linux folder inside UE's BatchFiles is basically empty... from what I read it should have a few .sh scripts?

Hi jlcd,
I met the same issue. What does the following mean, add to which file? thank you very much!
added shell=True to line 70 (inside subprocess.call)