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
In Python3 if you use pathlib module for parsing files from a directory, you get results in PosixPath objects. When you send it to r2 = r2pipe.open(filename), you receive an error:
File "main.py", line 30, in is_binary
r2 = r2pipe.open(filename)
File "/usr/local/lib/python3.7/site-packages/r2pipe/open_sync.py", line 32, in __init__
super(open, self).__init__(filename, flags)
File "/usr/local/lib/python3.7/site-packages/r2pipe/open_base.py", line 132, in __init__
if filename.startswith("#!pipe"):
AttributeError: 'PosixPath' object has no attribute 'startswith'
And you need convert this path to string: r2 = r2pipe.open(str(filename)). It would be good add support or check this functionality in r2pipe python module.
The text was updated successfully, but these errors were encountered:
In Python3 if you use pathlib module for parsing files from a directory, you get results in PosixPath objects. When you send it to
r2 = r2pipe.open(filename)
, you receive an error:And you need convert this path to string:
r2 = r2pipe.open(str(filename))
. It would be good add support or check this functionality in r2pipe python module.The text was updated successfully, but these errors were encountered: