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

test failing in 3_runSpecufex.py #2

Open
tsawi opened this issue Aug 17, 2021 · 3 comments
Open

test failing in 3_runSpecufex.py #2

tsawi opened this issue Aug 17, 2021 · 3 comments

Comments

@tsawi
Copy link
Collaborator

tsawi commented Aug 17, 2021

Full error message is attached


Traceback (most recent call last):
  File "../3_runSpecUFEx.py", line 120, in <module>
    nmf.fit(X[sample], verbose=1)
  File "/Users/theresasawi/opt/anaconda3/envs/seismo2/lib/python3.7/site-packages/specufex/nmf.py", line 38, in fit
    self.h01 = 1/self.num_pat
TypeError: unsupported operand type(s) for /: 'int' and 'tuple'

test_fail_2.txt

@ngroebner
Copy link
Owner

ngroebner commented Aug 17, 2021

This is due to an older version of specufex being installed.
Best to create a totally new conda environment and install the latest specufex.

Put the following into a file and name it "conda-env.yaml" or something like that:

name: spectest
channels:
  - conda-forge
  - defaults
dependencies:
  - python=3.8
  - numpy
  - scipy
  - h5py
  - jupyter
  - jupyterlab
  - matplotlib
  - pandas
  - pytables
  - pip

Then run

conda env create --file=conda-env.yml
conda activate spectest
pip install -e git+https://github.com/benholtzman/specufex.git

Then run the tests and see what happens.

A some point we need to have a mechanism for creating isolated python environments so we aren't always struggling with this! The cookiecutter template I made will do that, but I haven't adapted it to specufex yet.

@tsawi
Copy link
Collaborator Author

tsawi commented Aug 17, 2021

Ah, sorry about that.

@tsawi tsawi closed this as completed Aug 17, 2021
@ngroebner
Copy link
Owner

No reason to be sorry!

@tsawi tsawi reopened this Aug 18, 2021
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