paudetseis / RfPy

Teleseismic receiver function calculation and post-processing
https://paudetseis.github.io/RfPy/
MIT License
39 stars 28 forks source link

TypeError: argument of type 'WindowsPath' is not iterable #33

Open dip16gphy opened 2 years ago

dip16gphy commented 2 years ago

While using rfpy_ccp PBA.pkl --start=92.74,11.66 --end=92.75,11.65 --snr=10 --snrh=5 --no-outlier --load --prep --prestack --ccp --gccp --linear --figure , I am getting this error.

Traceback (most recent call last): File "c:\users\uplc\anaconda3\envs\rfpy\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\uplc\anaconda3\envs\rfpy\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\UPLC\anaconda3\envs\rfpy\Scripts\rfpy_ccp.exe__main__.py", line 7, in File "c:\users\uplc\anaconda3\envs\rfpy\lib\site-packages\rfpy\scripts\rfpy_ccp.py", line 623, in main ccpimage.save(prep_file) File "c:\users\uplc\anaconda3\envs\rfpy\lib\site-packages\rfpy\ccp.py", line 637, in save if not ".pkl" in title: TypeError: argument of type 'WindowsPath' is not iterable

However, the message also shows this before throwing error: image

wasjabloch commented 2 years ago

This should be fixed in the current master branch. Can you please test it and see if it resolved your issue?

dip16gphy commented 2 years ago

rfpy_ccp PBA.pkl --start=92.74,11.66 --end=92.75,11.65 --snr=10 --snrh=5 --no-outlier --load --prep --prestack --ccp --gccp --linear --figure

Again it throws the same error as above.

wasjabloch commented 2 years ago

Please have a look at the updated version and let me know if the issue persists.

dip16gphy commented 2 years ago

Please have a look at the updated version and let me know if the issue persists.

nothing changes!! Again same error

wasjabloch commented 2 years ago

The problem is not obvious to me. Can you please copy+paste the entire Traceback here?

dip16gphy commented 2 years ago

Traceback (most recent call last): File "c:\users\uplc\anaconda3\envs\rfpy\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\uplc\anaconda3\envs\rfpy\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\UPLC\anaconda3\envs\rfpy\Scripts\rfpy_ccp.exemain.py", line 7, in File "c:\users\uplc\anaconda3\envs\rfpy\lib\site-packages\rfpy\scripts\rfpy_ccp.py", line 623, in main ccpimage.save(prep_file) File "c:\users\uplc\anaconda3\envs\rfpy\lib\site-packages\rfpy\ccp.py", line 637, in save if not ".pkl" in title: TypeError: argument of type 'WindowsPath' is not iterable

Traceback (most recent call last): File "c:\users\uplc\anaconda3\envs\rfpy\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\uplc\anaconda3\envs\rfpy\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\UPLC\anaconda3\envs\rfpy\Scripts\rfpy_ccp.exe_main.py", line 7, in File "c:\users\uplc\anaconda3\envs\rfpy\lib\site-packages\rfpy\scripts\rfpy_ccp.py", line 623, in main ccpimage.save(prep_file) File "c:\users\uplc\anaconda3\envs\rfpy\lib\site-packages\rfpy\ccp.py", line 637, in save if not ".pkl" in title: TypeError: argument of type 'WindowsPath' is not iterable

wasjabloch commented 2 years ago

It looks like you are still using the former version of RfPy. The line in question has now moved to 638, instead of 637, where your error is occurring. This suggests that in the code you are using line 633 does not contain the most recent fix

title = str(title)

Please try downloading the most recent RfPy version and re-installing it.