Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWindows: Non-ascii username causes mach to fail #26406
Comments
|
This kludge fixes the issue, cannot recommend for everyone ( environ_dict = eval(stdout.decode(encoding))
valid_environ_dict = {}
for key, value in environ_dict.items():
try:
value.decode('ascii')
valid_environ_dict[key] = value
except UnicodeEncodeError:
pass
os.environ.update(valid_environ_dict)Still looking for a better solution. |
|
I get the following error when building now:
|
|
This issue caused by Cargo home path set to Reinstalling Rust with
Hopefully these issues will be resolved after Mozilla moved to full Python 3 support. |
|
Sorry there were so many issues, but I'm glad you were able to find workarounds. |
Hello,
I am trying to build servo on Windows. My username in Windows is Петр (non-ascii) which causes builds to crash. I have manged to mitigate some issues while some are still unresolved. I still cannot build servo on my machine. Hope that somebody finds it helpful. I would also like to know if there is anything else that could be done to improve my building experience.
So, the username causes troubles when building.
My Project folder was
C:\Users\Петр\Documents\Projects\servowhich is non-ascii and non-ascii build paths are not supported (see #10002, #10003). This can be mitigated by moving the project to another directory.machshould support it. I ranmachby runningpy -3 mach. Here is the error:The error hinted that there was something with the
sys.pathvariable. So, I tried inspecting it in:OK, I removed this site-packages path (is was from a previous Python installation).
My $PATH system variable on Windows contains a lot of paths with the following prefix:
C:\Users\Петр, so that's why it was crashing (see #20435). The variable contained a lot of scripts that were necessary for me and for Rust itself (for example,rustc.exeis located inC:\Users\Петр\.cargo\bin\rustc.exe).At first, I got stuck here. But after complaining on Matrix,
sebkadvised to create a symlink. So, I did it:I then changed all instances of my user folder in $PATH to point to the symlink (including the one that contained
%USERPROFILE%variable)..\mach build --dev -p servo:The issue happens when it tries to decode the output of a Python snippet:
The code was added by #25365. I appears that it tried to copy my entire env (and decode that). Maybe we should output only necessary variables instead of spitting out all environment variables? I know that this would be a lot of variables to change and it could break things.
I am happy to help with the issue, just tell me what we can improve here.