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
{{ message }}
Repository navigation
Error in executing tutorials due to "TypeError: cannot use a string pattern on a bytes-like object" #136
imac@imacs-iMac examples % python parameter_summary.py
Traceback (most recent call last):
File "/Users/imac/Downloads/dev/bg/diffpy.srmise/doc/examples/parameter_summary.py", line 236, in <module>
run()
File "/Users/imac/Downloads/dev/bg/diffpy.srmise/doc/examples/parameter_summary.py", line 45, in run
ppe.loadpdf("data/TiO2_fine_qmax26.gr")
File "/Users/imac/Downloads/dev/bg/diffpy.srmise/src/diffpy/srmise/pdfpeakextraction.py", line 87, in loadpdf
d.read(pdf)
File "/Users/imac/Downloads/dev/bg/diffpy.srmise/src/diffpy/srmise/pdfdataset.py", line 205, in read
self.readStr(open(filename, "rb").read())
File "/Users/imac/Downloads/dev/bg/diffpy.srmise/src/diffpy/srmise/pdfdataset.py", line 231, in readStr
res = re.search(r"^#+ start data\s*(?:#.*\s+)*", datastring, re.M)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/imac/miniconda3/envs/srmise/lib/python3.12/re/__init__.py", line 177, in search
return _compile(pattern, flags).search(string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot use a string pattern on a bytes-like object
Activity
bobleesj commentedon Oct 23, 2024
Progress made - PR on the way.