Skip to content
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

OSError: [WinError 193] %1 is not a valid Win32 application #914

Open
zhengyuxin0507 opened this issue Mar 25, 2024 · 2 comments · May be fixed by #939
Open

OSError: [WinError 193] %1 is not a valid Win32 application #914

zhengyuxin0507 opened this issue Mar 25, 2024 · 2 comments · May be fixed by #939
Labels

Comments

@zhengyuxin0507
Copy link

zhengyuxin0507 commented Mar 25, 2024

Description
I compiled rosbridge_suite in windows, then occuer this error.

  • Library Version: ros2 branch, commit id: 7d78af1
  • ROS Version: ROS2-Iron
  • Platform / OS: Windows 11,64bit
    image

Steps To Reproduce

  1. git clone https://github.com/RobotWebTools/rosbridge_suite.git
  2. call $MY_PATH_TO_ROS\setup.bat
  3. colcon build
  4. ros2 launch rosbridge_server rosbridge_websocket_launch.xml

Expected Behavior
rosbridge run sucessfully.

Actual Behavior

OSError: [WinError 193] %1 is not a valid Win32 application

image

@EricGallimore
Copy link
Contributor

EricGallimore commented Jul 15, 2024

I have this issue when trying to use rosbridge under Jazzy on Windows 10.

I've also tried copying rosapi_node to "rosapi_node.exe" and running it, and then I get

C:\Users\robot\colcon_ws\install\rosapi\Lib\rosapi>rosapi_node.exe
This version of C:\Users\robot\colcon_ws\install\rosapi\Lib\rosapi\rosapi_node.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.

However, this isn't going to help, since rosapy_node is a python script. The issue seems to be that Windows doesn't handle shebangs.

@EricGallimore
Copy link
Contributor

EricGallimore commented Jul 16, 2024

The short version of this is that rosbridge has a number of Python packages that are currently built using ament_cmake. To make it work under Windows, they will need to be converted to use ament_python (as far as I can tell).

ament_python invokes setuptools and will generate exe file wrappers for all the Python scripts listed in the entry_points['console_scripts'] dictionary inside setup.py. These can be run on Windows.

It's not clear (and may be impossible) to generate the exe wrappers using ament_cmake and ament_cmake_python.

I've been able to get rosapi to work by converting it to an ament_python package. I'll try to get a fork and PR up soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants