pypyodbc
pypyodbc copied to clipboard
TypeError: cannot use a string pattern on a bytes-like object
Hi, sorry I don't know if this is the best place to post the issue I have seen.
I followed the instructions here. https://code.google.com/archive/p/pypyodbc/wikis/Enable_SQLAlchemy_on_PyPy.wiki There is an error when returning the server property on my machine its 12.0.2269.0. in the file Traceback: sqlalchemy\dialects\mssql\pypyodbc.py", line 285, in _get_server_version_info for n in r.split(raw):
raw is a byte. ["b'12", '0', '2269', "0'"]
So, a string function cannot be used. to get this working, I have altered the above file by converting this to a string for n in r.split(raw.decode("utf-8")):
this fix's the issue for me. whether its the correct fix or not, but its a hot fix for me.
I just thought id post it.
cheers