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

fix TypeError under osx & py3k #441

Merged
merged 1 commit into from
Jul 28, 2017
Merged

fix TypeError under osx & py3k #441

merged 1 commit into from
Jul 28, 2017

Conversation

benureau
Copy link
Contributor

Got this error under OSX 10.11.4 with Python 3.5.1:

$ rosdep install --from-paths src --ignore-src --rosdistro jade -y --as-root pip:no --skip-keys=gazebo

ERROR: Rosdep experienced an error: a bytes-like object is required, not 'str'
Please go to the rosdep page [1] and file a bug report with the stack trace below.
[1] : http://www.ros.org/wiki/rosdep

rosdep version: 0.11.4

Traceback (most recent call last):
  File "/Users/fabien/.pyenv/versions/3.5.1/lib/python3.5/site-packages/rosdep-0.11.4-py3.5.egg/rosdep2/main.py", line 136, in rosdep_main
    exit_code = _rosdep_main(args)
  File "/Users/fabien/.pyenv/versions/3.5.1/lib/python3.5/site-packages/rosdep-0.11.4-py3.5.egg/rosdep2/main.py", line 353, in _rosdep_main
    return _package_args_handler(command, parser, options, args)
  File "/Users/fabien/.pyenv/versions/3.5.1/lib/python3.5/site-packages/rosdep-0.11.4-py3.5.egg/rosdep2/main.py", line 447, in _package_args_handler
    return command_handlers[command](lookup, packages, options)
  File "/Users/fabien/.pyenv/versions/3.5.1/lib/python3.5/site-packages/rosdep-0.11.4-py3.5.egg/rosdep2/main.py", line 654, in command_install
    installer.install(uninstalled, **install_options)
  File "/Users/fabien/.pyenv/versions/3.5.1/lib/python3.5/site-packages/rosdep-0.11.4-py3.5.egg/rosdep2/installers.py", line 485, in install
    verbose=verbose, quiet=quiet)
  File "/Users/fabien/.pyenv/versions/3.5.1/lib/python3.5/site-packages/rosdep-0.11.4-py3.5.egg/rosdep2/installers.py", line 515, in install_resolved
    command = installer.get_install_command(resolved, interactive=interactive, reinstall=reinstall, quiet=quiet)
  File "/Users/fabien/.pyenv/versions/3.5.1/lib/python3.5/site-packages/rosdep-0.11.4-py3.5.egg/rosdep2/platforms/osx.py", line 316, in get_install_command
    resolved = self.remove_duplicate_dependencies(resolved)
  File "/Users/fabien/.pyenv/versions/3.5.1/lib/python3.5/site-packages/rosdep-0.11.4-py3.5.egg/rosdep2/platforms/osx.py", line 347, in remove_duplicate_dependencies
    if brew_strip_pkg_name(other.package) == brew_strip_pkg_name(d):
  File "/Users/fabien/.pyenv/versions/3.5.1/lib/python3.5/site-packages/rosdep-0.11.4-py3.5.egg/rosdep2/platforms/osx.py", line 157, in brew_strip_pkg_name
    return package.split('/')[-1]
TypeError: a bytes-like object is required, not 'str

This is due to package sometimes being of type bytes. This is fixed by this pull request. I did not test it under any other version than Python 3.5.1.

Copy link
Contributor

@wjwwood wjwwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks

@wjwwood wjwwood merged commit b8105ef into ros-infrastructure:master Jul 28, 2017
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

Successfully merging this pull request may close these issues.

2 participants