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

r2b3 Lifecycle python client fails to start #404

Closed
sloretz opened this issue Sep 12, 2017 · 3 comments
Closed

r2b3 Lifecycle python client fails to start #404

sloretz opened this issue Sep 12, 2017 · 3 comments

Comments

@sloretz
Copy link
Contributor

sloretz commented Sep 12, 2017

MOVED TO ros2/demos#173

Bug report

Required Info:

Steps to reproduce issue

Source local_setup.bat and run this command (from this tutorial)

ros2 run lifecycle lifecycle_service_client_py.py

Expected behavior

usage: lifecycle_service_client_py.py [-h]
                                      [--change-state-args {configure,cleanup,shutdown,activate,deactivate}]
                                      {change_state,get_state,get_available_states,get_available_transitions}
                                      node

Actual behavior

C:\Users\osrf>ros2 run lifecycle lifecycle_service_client_py.py
Traceback (most recent call last):
  File "C:\dev\ros2\Scripts\ros2-script.py", line 11, in <module>
    load_entry_point('ros2cli==0.0.0', 'console_scripts', 'ros2')()
  File "C:\dev\ros2\Lib\site-packages\ros2cli\cli.py", line 64, in main
    rc = extension.main(parser=parser, args=args)
  File "C:\dev\ros2\Lib\site-packages\ros2run\command\run.py", line 73, in main
    return run_executable(path=path, argv=args.argv, prefix=prefix)
  File "C:\dev\ros2\Lib\site-packages\ros2run\api\__init__.py", line 55, in run_executable
    completed_process = subprocess.run(cmd)
  File "C:\Python36\lib\subprocess.py", line 403, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Python36\lib\subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "C:\Python36\lib\subprocess.py", line 992, in _execute_child
    startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application

Additional information

Same error if I drop the .py

C:\Users\osrf>ros2 run lifecycle lifecycle_service_client_py
Traceback (most recent call last):
  File "C:\dev\ros2\Scripts\ros2-script.py", line 11, in <module>
    load_entry_point('ros2cli==0.0.0', 'console_scripts', 'ros2')()
  File "C:\dev\ros2\Lib\site-packages\ros2cli\cli.py", line 64, in main
    rc = extension.main(parser=parser, args=args)
  File "C:\dev\ros2\Lib\site-packages\ros2run\command\run.py", line 73, in main
    return run_executable(path=path, argv=args.argv, prefix=prefix)
  File "C:\dev\ros2\Lib\site-packages\ros2run\api\__init__.py", line 55, in run_executable
    completed_process = subprocess.run(cmd)
  File "C:\Python36\lib\subprocess.py", line 403, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Python36\lib\subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "C:\Python36\lib\subprocess.py", line 992, in _execute_child
    startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application
@mikaelarguedas
Copy link
Member

Note: it works if calling Lib\lifecycle\lifecycle_service_client_py.py

I think it comes from the fact that it is installed as a program but doesnt have an .exe and python files are not considered "Windows executables" on windows

@dirk-thomas
Copy link
Member

@sloretz Please move the ticket into the repo which contains the package (https://github.com/ros2/demos/tree/master/lifecycle).

@Karsten1987 FYI since you added this in ros2/demos#86.

@sloretz
Copy link
Contributor Author

sloretz commented Sep 12, 2017

moved to ros2/demos#173

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

No branches or pull requests

3 participants