x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

HTML5 Build Error UnicodeDecodeError: 'ascii'

Whenever I try to build my HTML5 project, I keep getting this error.

alt text

 UATHelper: Packaging (HTML5):       File "F:\UE_4.20\Engine\Extras\ThirdPartyNotUE\emsdk\emscripten\1.37.19\emcc", line 13, in <module>
 UATHelper: Packaging (HTML5):         emcc.run()
 UATHelper: Packaging (HTML5):       File "F:\UE_4.20\Engine\Extras\ThirdPartyNotUE\emsdk\emscripten\1.37.19\emcc.py", line 1483, in run
 UATHelper: Packaging (HTML5):         final = shared.Building.llvm_opt(final, link_opts, DEFAULT_FINAL)
 UATHelper: Packaging (HTML5):       File "F:\UE_4.20\Engine\Extras\ThirdPartyNotUE\emsdk\emscripten\1.37.19\tools\shared.py", line 1886, in llvm_opt
 UATHelper: Packaging (HTML5):         proc = Popen([LLVM_OPT] + inputs + opts + ['-o', target], stdout=PIPE)
 UATHelper: Packaging (HTML5):       File "F:\UE_4.20\Engine\Extras\ThirdPartyNotUE\emsdk\Win64\python\2.7.5.3_64bit\lib\subprocess.py", line 711, in __init__
 UATHelper: Packaging (HTML5):         errread, errwrite)
 UATHelper: Packaging (HTML5):       File "F:\UE_4.20\Engine\Extras\ThirdPartyNotUE\emsdk\Win64\python\2.7.5.3_64bit\lib\subprocess.py", line 907, in _execute_child
 UATHelper: Packaging (HTML5):         args = list2cmdline(args)
 UATHelper: Packaging (HTML5):       File "F:\UE_4.20\Engine\Extras\ThirdPartyNotUE\emsdk\Win64\python\2.7.5.3_64bit\lib\subprocess.py", line 646, in list2cmdline
 UATHelper: Packaging (HTML5):         return ''.join(result)
 UATHelper: Packaging (HTML5):     UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128)
 PackagingResults: Error: 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128)
 UATHelper: Packaging (HTML5):   ERROR: UBT ERROR: Failed to produce item: F:\UE4 PROJECTS\ArchiWeb\Binaries\HTML5\ArchiWeb.js
 UATHelper: Packaging (HTML5):          (see C:\Users\ヒロ\AppData\Roaming\Unreal Engine\AutomationTool\Logs\F+UE_4.20\UBT-ArchiWeb-HTML5-Development_3.txt for full exception trace)
 PackagingResults: Error: UBT ERROR: Failed to produce item: F:\UE4 PROJECTS\ArchiWeb\Binaries\HTML5\ArchiWeb.js

(It was working fine at first with no issues and I have been always building properly, after a day of work, i thought about trying to build again and I just couldn't find out how to fix it) tried :

  • installing emscripten 1.21.0

  • activating it

  • fully rebuilding

  • changing

    from:
    attrs = ctypes.windll.kernel32.GetFileAttributesW(unicode(filepath))

    to:
    attrs = ctypes.windll.kernel32.GetFileAttributesW( filepath ) in the file packager.py

here is my full log file

https://pastebin.com/NpxfUK5V

I appreciate all help, thank you!

Product Version: UE 4.20
Tags:
html5error.png (100.0 kB)
more ▼

asked Jan 18 '19 at 12:08 PM in Packaging & Deployment

avatar image

Hirodemon
1 1 4

avatar image nick.shin STAFF Jan 23 '19 at 04:27 PM

note: when upgrading the emscripten toolchain -- you will also need to re-build the Thirdparty libraries used on HTML5 packaging. jic you're interested in doing this, the latest set of instructions are found here:

and read all of the README.*.md files

that said, you might have a stray "string/character" that's not (e.g.) utf8 -- and emscripten (that's currently python2 powered) hit against. please see this for details:

meaning, ensure you didn't copy and paste "auto formated' strings into your project. (e.g. copying text from a word doc -- where the straight double quote " is different to the curly open “ and curly closing ”)

avatar image Hirodemon Jan 24 '19 at 01:38 AM

Thank you for your answer. I have rebuilt the whole engine including the "Thirdparty libraries"

I also checked over 7 times variable by variable. There were no weird characters. All what I have typed was (a-z, A-Z, 0-9) I even had a + and I removed it. Still the same error.

Is there a possibility to send you privately the blueprints to check it up? or any other suggestions?

Thank you.

avatar image nick.shin STAFF Jan 24 '19 at 05:42 PM

are you using the new emscripten toolchain when using the new 3rdparty libs?

you need to ensure that when UE4 packages HTML5 that it is using the new version (new toolchain binaries can only work with libs built with same toolchain). so, make sure the version number match (the folder numbers from the README files i mentioned above):

and finally -- to help you see what's going on with the build, enable EMCC_DEBUG to print terse build commands. this may help narrow down what's going on with your build (uncomment the following line and then recompile UnrealBuildTool in visual studio):

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Thank you for your help, nick.shin.

Yes it was definitely directly after installing all pre-reqs of UE4 and UE4.21.2 release itself.

I didn't change any 3rd party file in that new version. Maybe I have to edit the EnvVars? Do you have any suggestion over that point? as I followed all the links that you sent me and couldn't achieve a specific solve.

However, fortunately, I could package a project on another PC. So I believe it was due from this one.

Eventually if I didn't have a solution on my current Workstation, I will format it fully and make sure everything is deleted this time so I could make it packages like the other PC.

more ▼

answered Jan 24 '19 at 06:47 PM

avatar image

Hirodemon
1 1 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
  • installed UE4.21.2

  • Created a new C++ empty project.

  • Tried to package for HTML5

  • I receive :

LogPlayLevel: Error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128)

LogPlayLevel: Error: ERROR: UBT ERROR: Failed to produce item: F:\UE4 PROJECTS\ArchDev421\Binaries\HTML5\ArchDev421.js

more ▼

answered Jan 24 '19 at 01:35 PM

avatar image

Hirodemon
1 1 4

avatar image nick.shin STAFF Jan 24 '19 at 05:48 PM

is this packaging done with the stock binaries and 3rd party libs? (i.e. no custom rebuilds or modified versions of the toolchain?)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question