-
Notifications
You must be signed in to change notification settings - Fork 45
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
Exception in shell extension 'bat' #92
Comments
Please post any kind of output as text - images are not searchable. Please also provide exact steps to reproduce the problem. In this case the content of your workspace as well as the locate you have set in your environment. |
Thanks for your answer. [1.484s] colcon.colcon_cmake.task.cmake.build ERROR Could not find a shell extension for the command environment Summary: 0 packages finished [0.56s] |
The information isn't sufficient to reproduce the problem yet. Please include how exactly you create the package (with all the arguments you used as well as potential other edits of the manifest file). Also please post the content of your environment variables (the output of You could also edit the source file where the exception is happening and try to add some debug output in that case to see what the variable |
Only [ c:\dev\ros2\mySource ros2 pkg create helloworld ] The output of set:
And thank you for your patience. I will try to debug to see if I can find out the reason. |
I find the problem in the Python37\Lib\site-packages\colcon_core\shell_init_.py and in the function get_environment_variables . the code is here:async def get_environment_variables(cmd, *, cwd=None, shell=True): I print out the variable "line" and result is that " b'adb=D:\workInNingbo\appSource\\xb8\xbd\xbc\xfe\xcb\xc4\xa3\xba\xc1\xe9\xd4\xc6\xc2\xf3\xbf\xcb\xb7\xe7\xd5\xf3\xc1\xd0\xb5\xf7\xca\xd4\xc8\xed\xbc\xfe\adb\xbb\xb7\xbe\xb3\xb4\xee\xbd\xa8\xb9\xa4\xbe\xdf\xb0\xfc\platform-tools' " So what does that mean? what I can do ? |
My guess here would be that UTF-8 does not contain the Chinese character set. I'm not sure where the UTF-8 requirement is held. |
The python decode method will require the correct encoding to be passed in, as it defaults to utf-8.
|
Can you please share information about your locale settings (by posting the output of the following commands):
|
Thank you for both answer. My win10 is the Chinese version but all location are named without any Chinese character. Should I change the os character set? the output : d:\dev\packages\1.helloworld>python -c "import locale; print(locale.getdefaultlocale())" d:\dev\packages\1.helloworld>python -c "import locale; print(locale.getpreferredencoding())" Let me try to change the character set and see what will happen. |
oh, I get it. I see where have the Chinese characters. |
It would be easy to patch the code to ignore environment variable which do contain characters which can't be decoded. Though I noticed that e.g. Can you please try the following command and post the output - it is trying to decode one of the problematic lines using your default encoding:
|
The command doesn't work , I am sorry. it just mean attachment four: lingyun Microphone Array debug tool \ adb environment setup package |
The locale had a flipped character. Please try this one again:
|
The result: Sometime the chinese characters are really big trouble. |
That is weird that is can't even decode the string with the default locale of your system. If you can figure out what locale is required to decode the string correctly on your system I would be happy to work on a patch. |
HI,I made it. appSource\xb8 should be appSource\\\xb8 xfe\adb should be xfe\\adb And It can work. I don't konw how it transforms between UTF-8 and cp936. Here are command and result: adb=D:\workInNingboppSource\附件四:灵云麦克风阵列调试软件\adb环境搭建工具包\platform-tools |
And if you run the same command with |
Result one: Result tow: I think the Result tow is what you want. |
No, result 2 is not valid since you can't use non-ASCII characters in Anyway I think using It would be great if you could try the proposed patch locally and confirm if it works afterwards (using the environment for which it fails currently). To install the modified version of
|
I try to build a ROS2 package but failed.
![default](https://user-images.githubusercontent.com/11359182/43497234-af674d80-9573-11e8-8ce2-3173667c781c.png)
My os is win10 with python3.7.0.
Here is my problem screent shot.
The text was updated successfully, but these errors were encountered: