Failed running python2 '...'/bro.py Ubuntu

Hello All,

I’ve got a mediocre text101 game I am trying to build to WebGL, but my google-fu is inferior today.

I have been squashing several build-bugs, but this one has me stumped.

Error below:

Failed running python2 "/home/mike/Unity/Hub/Editor/2020.2.1f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Brotli/python/bro.py" -o "/home/mike/Unity Projects/Text101/Playing With Sprites/Temp/StagingArea/Data/Output/Build/64 roms.data.br.compressed" -i "/home/mike/Unity Projects/Text101/Playing With Sprites/Temp/StagingArea/Data/Output/Build/64 roms.data.br" --comment "UnityWeb Compressed Content (brotli)"

stdout:
stderr:Traceback (most recent call last):  File "/home/mike/Unity/Hub/Editor/2020.2.1f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Brotli/python/bro.py", line 8, in <module>    import brotli  File "/home/mike/Unity/Hub/Editor/2020.2.1f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Brotli/dist/Brotli-0.4.0-py2.7-linux-x86_64.egg/brotli.py", line 7, in <module>  File "/home/mike/Unity/Hub/Editor/2020.2.1f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Brotli/dist/Brotli-0.4.0-py2.7-linux-x86_64.egg/brotli.py", line 3, in __bootstrap__ImportError: No module named pkg_resources

I have followed the directions here and given executable permission for the bro.py file and the python folder that contains it. I’ve also double-checked that python2 is installed on my system.

I have also tried using gzip compression and got different errors that I gave up on =P.

I am using Unity 2020.2.1f1 Personal (I did try building a different project). And my OS is Ubuntu 20.04. Any help is appreciated and I’m happy to answer questions to the best of my ability.

Thanks!

Solved! It turns out the problem was indicated at the end of the error log:

I followed the instructions here to solve.

Hi!

Quick question…why Python2? I’ve been doing the courses in Pop!OS (Systemn76/derived from Ubuntu) with no problems using C#/VS Code.

Just curious.

~Jago

Well, it actually turns out you shouldn’t be compressing when you build anyway, so I should have just turned off the compression that was throwing an error in order to upload anyway!

Hi Jason (I’m assuming)

I’m doing my scripting in C# using VS Code as well. The python is in unity - the compressor uses some python somehow. That’s about the depth of my knowledge, to be honest. Hope that helps!

Interesting. Did not know that. Thank you.

~Not Jason, Still Jago

Shoot, my bad. I didn’t notice your signature on the first. Sorry!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms