You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package does not allow to use a more general string type (such as InlineSring, which are often used by CSV.jl )
using InlineStrings
using PythonCall
re = pyimport("re")
# s is a String and all is fine:
s = "abc123def456ghi789"
re.findall("[a-z]", s)
# s is an InlineString
s = InlineString("abc123def456ghi789")
re.findall("[a-z]", s)
The last line errors with:
ERROR: Python: TypeError: expected string or bytes-like object
A simple
Py(s::AbstractString) = Py(String(s))
should do the trick.
The text was updated successfully, but these errors were encountered:
The package does not allow to use a more general string type (such as
InlineSring
, which are often used by CSV.jl )The last line errors with:
ERROR: Python: TypeError: expected string or bytes-like object
A simple
should do the trick.
The text was updated successfully, but these errors were encountered: