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

Error when running 'beat init' #41

Closed
vic-chou opened this issue Jun 27, 2019 · 12 comments
Closed

Error when running 'beat init' #41

vic-chou opened this issue Jun 27, 2019 · 12 comments

Comments

@vic-chou
Copy link

Hi, when I run the command "beat init LandersEQ 1992-06-28 --datatypes='seismic' --individual_gfs --n_sources=1 --source_type=MTSource --min_mag=7" to initialise a new Modeling Project, I meet an error:

beat init LandersEQ 1992-06-28 --datatypes='seismic' --individual_gfs --n_sources=1 --source_type=MTSource --min_mag=7
utility - INFO Getting relevant events from the gCMT catalog for the dates:1992-06-27 00:00:00.000 - 1992-06-29 00:00:00.000

config - INFO Added hyperparameter h_any_P_0_Z to config and model setup!
config - INFO Added hyperparameter h_any_S_1_Z to config and model setup!
config - INFO All hyperparameters ok!
config - INFO Number of hyperparameters! 2
config - INFO All priors ok!
Traceback (most recent call last):
File "/usr/local/bin/beat", line 9, in
load_entry_point('beat==1.0', 'console_scripts', 'beat')()
File "/usr/local/lib/python3.6/dist-packages/beat-1.0-py3.6-linux-x86_64.egg/beat/apps/beat.py", line 1641, in main
globals()'command_' + command
File "/usr/local/lib/python3.6/dist-packages/beat-1.0-py3.6-linux-x86_64.egg/beat/apps/beat.py", line 301, in command_init
individual_gfs=options.individual_gfs)
File "/usr/local/lib/python3.6/dist-packages/beat-1.0-py3.6-linux-x86_64.egg/beat/config.py", line 1437, in init_config
c.regularize()
File "/usr/local/lib/python3.6/dist-packages/pyrocko/guts.py", line 796, in regularize
self.validate(regularize=True, depth=depth)
File "/usr/local/lib/python3.6/dist-packages/pyrocko/guts.py", line 793, in validate
self.T.instance.validate(self, regularize, depth)
File "/usr/local/lib/python3.6/dist-packages/pyrocko/guts.py", line 506, in validate
val = validator.validate_children(val, regularize, depth)
File "/usr/local/lib/python3.6/dist-packages/pyrocko/guts.py", line 518, in validate_children
newpropval = prop.validate(propval, regularize, depth-1)
File "/usr/local/lib/python3.6/dist-packages/pyrocko/guts.py", line 506, in validate
val = validator.validate_children(val, regularize, depth)
File "/usr/local/lib/python3.6/dist-packages/pyrocko/guts.py", line 518, in validate_children
newpropval = prop.validate(propval, regularize, depth-1)
File "/usr/local/lib/python3.6/dist-packages/pyrocko/guts.py", line 506, in validate
val = validator.validate_children(val, regularize, depth)
File "/usr/local/lib/python3.6/dist-packages/pyrocko/guts.py", line 518, in validate_children
newpropval = prop.validate(propval, regularize, depth-1)
File "/usr/local/lib/python3.6/dist-packages/pyrocko/guts.py", line 503, in validate
validator.validate_extra(val)
File "/usr/local/lib/python3.6/dist-packages/pyrocko/guts.py", line 1315, in validate_extra
self.xname(), val, repr(self.choices)))
pyrocko.guts.ValidationError: structure: "identity" is not a valid choice out of ['variance', 'exponential', 'import', 'non-toeplitz']
I don't know how to fix this. Can you give me some suggestions?

@hvasbath
Copy link
Owner

Thanks for reporting. Thats an issue I will have to fix on the code side. ...

@hvasbath
Copy link
Owner

Fixed in: 97729c5
Please update your local installation! Please re-open if the issue persists.

@SedaOzarpaci
Copy link

Hi,

When I wrote;

beat init --help

it says;
Traceback (most recent call last):
File "/usr/local/bin/beat", line 5, in
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2749, in
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 444, in _build_master
ws.require(requires)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 725, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 628, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: psutil

I don't understand the problem. Could you please help?

@hvasbath
Copy link
Owner

you need to install the package psutil
Which operating system do you use? Do you use anaconda?
for example with:
sudo apt install python3-psutil

If you use anaconda then you should use that instead of the system manager.

@SedaOzarpaci
Copy link

SedaOzarpaci commented Dec 16, 2020 via email

@hvasbath
Copy link
Owner

Dear Seda,

if you did not use anaconda before there is no need to install it.
Ubuntu 14 is a VERY VERY OLD Operating System. I strongly recommend updating it to at least 18.04.
It is even officially from the Ubuntu side not supported anymore. So you wont get updates and you will face exactly such package versioning issues as you see now.

Especially, when you start learning a new software you will want to at least reduce that error source to its minimum.

All the best!
Hannes

@SedaOzarpaci
Copy link

SedaOzarpaci commented Dec 20, 2020 via email

@hvasbath
Copy link
Owner

You need to upgrade scipy to its latest version. Now you have only an old version installed.
pip3 install scipy --upgrade

@SedaOzarpaci
Copy link

SedaOzarpaci commented Dec 20, 2020 via email

@hvasbath
Copy link
Owner

Likely you have multiple scipy versions installed in your computer. Clearly the updated one fulfills the requirements.

Please test in a python/ipython session:

import scipy
print(scipy.version.version)

With:
print(scipy.file)

you then can locate which package is loaded- hopefully that is the old scipy. You need to remove that then.
In case you have even more than 2 you need to make sure to only install one. If you install several you need to make use of environments, as with anaconda.

All the best and good luck!
Hannes

@SedaOzarpaci
Copy link

SedaOzarpaci commented Dec 21, 2020 via email

@hvasbath
Copy link
Owner

With python it is possible to install different versions of the same package in parallel if you are not careful and new to python.
Thats why anaconda exists to prevent it from happening. But if you dont know it well you can still seriously mess things up.
It happens if you use multiple package managers like apt, pip3 and or anaconda.

Now you have somewhere in your computer multiple installations of scipy. You can also try:
locate scipy

To find all the different versions.

Likely you have a scipies under the path(s) (might be slightly different for you if you have a different python version):
/usr/local/lib/python3.6/dist-packages/
/usr/lib/python3.6/dist-packages/
/home/seda/.local/lib/python3.6/site-packages/

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

3 participants