Skip to content

TypeError: cannot use a string pattern on a bytes-like object #7

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

Open
jkirk opened this issue Jan 6, 2024 · 0 comments
Open

TypeError: cannot use a string pattern on a bytes-like object #7

jkirk opened this issue Jan 6, 2024 · 0 comments

Comments

@jkirk
Copy link
Owner

jkirk commented Jan 6, 2024

After converting to Python3 regional-diff.py fails with following error:

root@9ce9c82d1ce7:/code# scripts/regional-diff.py -f scripts/637.osc.gz 
Traceback (most recent call last):
  File "/code/scripts/regional-diff.py", line 554, in <module>
    posm = PlanetOsm()
           ^^^^^^^^^^^
  File "/code/scripts/regional-diff.py", line 130, in __init__
    self.update()
  File "/code/scripts/regional-diff.py", line 517, in update
    self.__osmosis()
  File "/code/scripts/regional-diff.py", line 206, in __osmosis
    changed_stream = re.sub('delete>','modify>',simplified_diff)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/__init__.py", line 185, in sub
    return _compile(pattern, flags).sub(repl, string, count)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot use a string pattern on a bytes-like object
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

1 participant