-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] UTF8 error on Windows #16921
Comments
Hi @Todiq Thanks for your report. The issue seems to be coming while loading the Can you please try to generate that |
It looks like the issue is coming from the version of powershell: https://stackoverflow.com/questions/40098771/changing-powershells-default-output-encoding-to-utf-8 Here is the result of the Preamble :
BodyName : utf-8
EncodingName : Unicode (UTF-8)
HeaderName : utf-8
WebName : utf-8
WindowsCodePage : 1200
IsBrowserDisplay : True
IsBrowserSave : True
IsMailNewsDisplay : True
IsMailNewsSave : True
IsSingleByte : False
EncoderFallback : System.Text.EncoderReplacementFallback
DecoderFallback : System.Text.DecoderReplacementFallback
IsReadOnly : True
CodePage : 65001 And on IsSingleByte : True
BodyName : iso-8859-1
EncodingName : Western Europe (Windows)
HeaderName : Windows-1252
WebName : Windows-1252
WindowsCodePage : 1252
IsBrowserDisplay : True
IsBrowserSave : True
IsMailNewsDisplay : True
IsMailNewsSave : True
EncoderFallback : System.Text.InternalEncoderBestFitFallback
DecoderFallback : System.Text.InternalDecoderBestFitFallback
IsReadOnly : True
CodePage : 1252 Meaning that conan's output is overriden by the shell running it. My command is the following: Since I am running the I want to have as much cross-platform commands as possible between linux and windows jobs. So, instead of switching the |
Sounds good, it sounds that powershell moving from 1252 to utf-8 is basically aligned with most of the ecosystem. |
Do you think that adding a clean error instead of a traceback would be a good solution for people that may encounter the same issue? Also, I edited my path by putting [vcvarsall.bat] Environment initialized for: 'x64'
The argument '&'C:\workspace\core\build\windows-msvc-194-x86_64\generators\conanbuild.ps1'' is not recognized as the name of a script file. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Usage: pwsh[.exe] [-Login] [[-File] <filePath> [args]]
[-Command { - | <script-block> [-args <arg-array>]
| <string> [<CommandParameters>] } ]
[-CommandWithArgs <string> [<CommandParameters>]
[-ConfigurationName <string>] [-ConfigurationFile <filePath>]
[-CustomPipeName <string>] [-EncodedCommand <Base64EncodedCommand>]
[-ExecutionPolicy <ExecutionPolicy>] [-InputFormat {Text | XML}]
[-Interactive] [-MTA] [-NoExit] [-NoLogo] [-NonInteractive] [-NoProfile]
[-NoProfileLoadTime] [-OutputFormat {Text | XML}]
[-SettingsFile <filePath>] [-SSHServerMode] [-STA]
[-Version] [-WindowStyle <style>]
[-WorkingDirectory <directoryPath>]
pwsh[.exe] -h | -Help | -? | /?
PowerShell Online Help https://aka.ms/powershell-docs
All parameters are case-insensitive.
ERROR: conanfile.py (castcore/0.1): Error in build() method, line 130
cmake.configure()
ConanException: Error 64 while executing My entrypoint being |
Sure, I think something similar was added in last version for loading package lists, so a similar error check could be added for loading graph.json files.
This looks strange. That is the launcher for the |
The file exists, is in UTF-8 and contains the following: & "$PSScriptRoot/conanvcvars.ps1"
& "$PSScriptRoot/conanbuildenv-release-x86_64.ps1" |
With the last Conan version 2.7 and using |
I think that renaming I explicitely set back |
That could make sense, sometimes the system or the app itself can do different things based on the executable name.
Then it seems we could close the ticket? If I understood correctly this is then something external to Conan related to the powershell encoding. Thanks for the feedback. |
Unless you want to clean up the traceback to something clearer, sure, you can close it. Many thanks |
You are right, lets improve that error message, targeting that for 2.8 |
Closed by #16936 that improves the message, for next Conan 2.8. Thanks again for the feedback. |
Inital issue may be fixed by #17507. This allows to use the same commands for all the OSs (good in CI), without forcing Windows runners to have pwsh installed |
Describe the bug
version: 2.7.0
conan_path: C:\venv\Scripts\conan
python
version: 3.9.13
sys_version: 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
sys_executable: C:\venv\Scripts\python.exe
is_frozen: False
architecture: AMD64
system
version: 10.0.20348
platform: Windows-10-10.0.20348-SP0
system: Windows
release: 10
cpu: Intel64 Family 6 Model 186 Stepping 3, GenuineIntel
How to reproduce it
Hello,
My project needs to have a
.gitattributes
file in order for the C++ code to compile (because of the encoding). I naively put the following lines in it:However, running a
conan list --graph=graph.json --graph-binaries="*" --format=json > installed.json
returns:I tried editing the
.gitattributes
to have the following instead:but I still get the same error. Do you have any ideas? Thanks in advance.
The text was updated successfully, but these errors were encountered: