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

Decode stdout during documentation build #628

Merged
merged 1 commit into from
Sep 15, 2018
Merged

Decode stdout during documentation build #628

merged 1 commit into from
Sep 15, 2018

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Sep 14, 2018

I think that I'm seeing this because doc builds are happening with python 3 on Fedora. Looks like subprocess.check_output returns a byte string, which needs to be decoded for re.sub.

Here is the error I'm seeing:

  ...
  File "./rosdep_doc_utils.py", line 38, in run
    nodes.literal_block(text=re.sub(escaped_capitalized_usage, '', out))
  File "/usr/lib64/python3.6/re.py", line 191, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: cannot use a string pattern on a bytes-like object

@cottsay cottsay changed the title Decode stdout during documenatation build Decode stdout during documentation build Sep 14, 2018
I think that I'm seeing this because doc builds are happening with
python 3 on Fedora. Here is the error I'm seeing:

```
...
  File "./rosdep_doc_utils.py", line 38, in run
    nodes.literal_block(text=re.sub(escaped_capitalized_usage, '', out))
  File "/usr/lib64/python3.6/re.py", line 191, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: cannot use a string pattern on a bytes-like object
```
@wjwwood wjwwood merged commit 1fc7cb7 into ros-infrastructure:master Sep 15, 2018
at-wat pushed a commit to at-wat/rosdep that referenced this pull request Nov 15, 2018
I think that I'm seeing this because doc builds are happening with
python 3 on Fedora. Here is the error I'm seeing:

```
...
  File "./rosdep_doc_utils.py", line 38, in run
    nodes.literal_block(text=re.sub(escaped_capitalized_usage, '', out))
  File "/usr/lib64/python3.6/re.py", line 191, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: cannot use a string pattern on a bytes-like object
```
@cottsay cottsay deleted the doc_decode branch June 3, 2020 17:59
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