Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named config #22

Open
jdimech opened this issue Nov 13, 2020 · 3 comments
Open

No module named config #22

jdimech opened this issue Nov 13, 2020 · 3 comments

Comments

@jdimech
Copy link

jdimech commented Nov 13, 2020

Just set up a conda environment for FAST. Trying to run the following command:

$ python run_fp.py -c config.json

Encountering the following error:

Fingerprinting ../parameters/fingerprint/fp_input_CI_TPC_EHZ.json
Traceback (most recent call last):
File "gen_fp.py", line 5, in
from config import *
ModuleNotFoundError: No module named 'config'

Any ideas what is causing this problem? Probably a very simple solution. Thanks.

@kexinrong
Copy link
Contributor

Thanks for reporting this! I just pushed a fix for this problem (i was from a previous commit error). Let me know whether the fix works for you.

@jdimech
Copy link
Author

jdimech commented Nov 13, 2020

Thanks for quick reply! It's a step in the right direction but the program is still generating errors for me:

Fingerprinting ../parameters/fingerprint/fp_input_CI_TPC_EHZ.json
/nas/active/ops/nmp/research/jesse/FAST/fingerprint/feature_extractor.py:172: SyntaxWarning: "is" with a literal. Did you mean "=="?
if type is 'MAD':
/nas/active/ops/nmp/research/jesse/FAST/fingerprint/feature_extractor.py:186: SyntaxWarning: "is" with a literal. Did you mean "=="?
if type is 'Zscore':
/nas/active/ops/nmp/research/jesse/FAST/fingerprint/feature_extractor.py:192: SyntaxWarning: "is" with a literal. Did you mean "=="?
if type is 'Zscore':
/nas/active/ops/nmp/research/jesse/FAST/fingerprint/feature_extractor.py:195: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif type is 'MAD':
Traceback (most recent call last):
File "MAD.py", line 10, in
from feature_extractor import *
File "/nas/active/ops/nmp/research/jesse/FAST/fingerprint/feature_extractor.py", line 19, in
from scipy.misc import imresize
ImportError: cannot import name 'imresize' from 'scipy.misc' (/nas/active/ops/nmp/research/jesse/anaconda3/envs/fast/lib/python3.8/site-packages/scipy/misc/init.py)
Traceback (most recent call last):
File "finger_print.py", line 7, in
from feature_extractor import *
File "/nas/active/ops/nmp/research/jesse/FAST/fingerprint/feature_extractor.py", line 19, in
from scipy.misc import imresize
ImportError: cannot import name 'imresize' from 'scipy.misc' (/nas/active/ops/nmp/research/jesse/anaconda3/envs/fast/lib/python3.8/site-packages/scipy/misc/init.py)
sh: ../data/waveformsTPC/fingerprints/TPC.EHZ.fp: No such file or directory
sh: ../data/waveformsTPC/timestamps/TPC.EHZ.ts: No such file or directory
Traceback (most recent call last):
File "gen_fp.py", line 60, in
num_lines = sum(1 for line in open(ts_file))
FileNotFoundError: [Errno 2] No such file or directory: '../data/waveformsTPC/timestamps/ts_Deci5.Pick.19991015130000.CI.TPC.EHZ.sac'
Processing for MAD

I installed the older pre-python 3 version of FAST in a separate conda environment and that command seems to work as it should with no errors or warnings.

Also I think the dependency "sklearn" in requirements.txt should be "scikit-learn", unless I am mistaken?

Thanks again for your help

@kexinrong
Copy link
Contributor

It seems that the imresize function was removed in scipy 1.3.0. You might want to downgrade scipy to an earlier version, or use the new function instead. For reference, I was testing using scipy version 1.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants