Skip to content

Conversation

@dweindl
Copy link
Member

@dweindl dweindl commented Dec 18, 2023

No description provided.

dweindl and others added 2 commits December 18, 2023 15:34
... again.

Fixes an error when trying to apply re.sub to numeric values:

```
    petab.flatten_timepoint_specific_output_overrides(problem)
build/venv/lib/python3.9/site-packages/petab/core.py:290: in flatten_timepoint_specific_output_overrides
    observable[target] = re.sub(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

pattern = 'observableParameter([0-9]+)_obs_a'
repl = 'observableParameter\\1_obs_a__10__c0', string = 1, count = 0, flags = 0

    def sub(pattern, repl, string, count=0, flags=0):
        """Return the string obtained by replacing the leftmost
        non-overlapping occurrences of the pattern in string by the
        replacement repl.  repl can be either a string or a callable;
        if a string, backslash escapes in it are processed.  If it is
        a callable, it's passed the Match object and must return
        a replacement string to be used."""
>       return _compile(pattern, flags).sub(repl, string, count)
E       TypeError: cannot use a string pattern on a bytes-like object

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/re.py:210: TypeError
```
@dweindl dweindl requested a review from dilpath December 18, 2023 14:39
@dweindl dweindl requested a review from a team as a code owner December 18, 2023 14:39
@dweindl dweindl merged commit c7d93c3 into main Dec 18, 2023
@dweindl dweindl deleted the release_0.2.7 branch December 18, 2023 16:58
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.

3 participants