-
Notifications
You must be signed in to change notification settings - Fork 18
'utf-8' codec can't decode byte 0xa2 in position 27: invalid start byte #60
Comments
Do you have a system language that isn't english? Another user reported a similar problem and he had german as system language when installing visual studio, reinstalling it using english seemed to fix it for him. |
Can you please run this in PowerShell and tell us what it prints? Get-WinSystemLocale | Select-Object Name, DisplayName, @{ n='OEMCP'; e={ $_.TextInfo.OemCodePage } }, @{ n='ACP'; e={ $_.TextInfo.AnsiCodePage } }
[cultureinfo]::CurrentCulture.TextInfo.ANSICodePage Hopefully we can figure out which of these is weird and make whichever bit of Python is failing when it gets a weird one query what's actually being used. |
Name DisplayName OEMCP ACP ru-RU Русский (Россия) 866 1251 This response is for execution in PS. But I don't have paths with Russian names. Although the system is Russian speaking |
VS must be in English? |
Switched to the English interface. In Visual Studio, the Installer disabled the Russian language pack and enabled English. In PS, the answer remained the same:
After that, I was able to install the project via python.exe unimake.py Open organizer.sln. But when building in debug mode, mismatch errors are cooked and the project is not assembled. And in the release only the last successful version is collected for the selected INSTALL project. |
1>------ Build started: Project: ModOrganizer, Configuration: Release x64 ------ |
You need to use RelWithDebugInfo as configuration. |
Thanks!!! |
This issue shouldn't be closed yet as it's not intentional that you need to set the VS language to English. Thankfully, the stack trace in the first post says exactly where we're decoding something as UTF-8 that isn't UTF-8, but if you can change the VS language separately from the system's code page, that could make it difficult to detect the right one from Python. Hopefully it's just relying on there being Latin characters in cp1251 and it's still using the system default encoding. |
Apparently we can request MSBuild uses a specific encoding (like UTF8 which would work everywhere) when logging to a file, but not to stdout, which is irritating. |
OK! I don't understand much about it, to be honest. My goal was to add several fields. I did it. If you need my help to catch an error or something else-please contact me-I will help! |
I think I know what needs changing. Can you try setting the language back to Russian, and then changing this line https://github.com/ModOrganizer2/modorganizer-umbrella/blob/master/unibuild/modules/msbuild.py#L128 to use |
Yes, it worked! |
2020-02-15 14:44:35,826 finished project "spdlog" 2020-02-15 14:44:35,828 run task "cmake zlib" |
cmake.py |
Yeah, there's another place in the same commit where Silarn defaulted to UTF-8: 0697ec7 Does everything work if you sort out the CMake one, too? |
2020-02-15 16:56:42,481 run task "msbuild ncc" |
I did not encounter such an error during the last installation in the Russian version of the system and VS |
Can you put the two log files in two github gists and link them here? I don't think that's likely to be the same encoding problem, but obviously things shouldn't break. |
I don't know what to do? What are the files? Yes, and the gists somehow did not have to use. |
The error you got says
If you look in those files and upload them as github gists, it will say what broke. |
I have a suspicion that the Nexus have done something dumb. What happens if you download the Nexus Mod Manager source on its own and try to build it with your language still set to Russian? I think they've made it build using a file specific to the system language, and there's not one for Russian. The English and German ones are identical, so there's probably no reason why you couldn't make another copy and give it the right name for Russian and submit it in a pull request to the Nexus. |
I have now encountered another error! I don't even know what the reason is. Very strange. I made a lot of attempts, but it feels like something broke. Despite the fact that I tried it in the English-language system.
All software was reinstalled, changed paths, disks, tried on the current repository and on the new one. |
Is it possible you're using Python 2 instead of 3 or have otherwise buggered your Python install? |
YES, it's related to Python. Why is it in the PATH would have ordered 2 and not 3. |
If you put something on the front of the system path, it's going to take priority over anything that's already there. Most installers just put their entry at the front as that's how they can guarantee it can be seen. I guess you installed 2.7 after 3. If you want to run with a specific version when both are installed, instead of As for the NCC stuff, have you tried what I suggested, i.e.trying to build Nexus Mod Manager from source from the official repo. That'll help us narrow down whether it's or cider on top of NMM that's breaking our if it's their code. |
Today, I finally got to a new attempt to build a project on the Russian- language system. And have encountered an unexpected error: And in fact , "http://www.7-zip.org" unavailable. |
https://github.com/Nexus-Mods/Nexus-Mod-Manager |
Hello! I do everything according to the description. Drains 1.4 GB and falls on this error:
`2020-02-13 23:47:24,718 finished project "GTest_32"
2020-02-13 23:47:24,719 run task "msbuild_32 usvfs"
C:\modorganizer-umbrella\build\usvfs\vsbuild> msbuild usvfs.sln /maxcpucount /property:Configuration=Release /verbosity:minimal /consoleloggerparameters:Summary /fileLogger /fileloggerparameters:Summary;Verbosity=normal /property:Platform=x86 /target:Clean;Build /p:WindowsTargetPlatformVersion=10.0.18362.0
Compiling [ ] 0%
2020-02-13 23:47:24,828 'utf-8' codec can't decode byte 0xa2 in position 27: invalid start byte
Traceback (most recent call last):
File "C:\modorganizer-umbrella\unibuild\modules\msbuild.py", line 128, in process
line = proc.stdout.readline().decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa2 in position 27: invalid start byte
2020-02-13 23:47:24,829 task msbuild_32 usvfs failed
2020-02-13 23:47:24,879 failed to run "C:\Users\ADrobkov\AppData\Local\Programs\Python\Python38\python.exe" unimake.py --set architecture="x86" -b "build" -p "progress" -i "install" -d "C:\modorganizer-umbrella" "usvfs" (returncode 1)
2020-02-13 23:47:24,880 task run unimake_x86_usvfs failed`
What could be the reason? Everything was installed as it is written. And if you need any data, I will provide it...
The text was updated successfully, but these errors were encountered: