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

It does not recognizes the MTfit attributes on Python scripts #62

Open
FelixRRC opened this issue Feb 14, 2020 · 3 comments
Open

It does not recognizes the MTfit attributes on Python scripts #62

FelixRRC opened this issue Feb 14, 2020 · 3 comments

Comments

@FelixRRC
Copy link

Environment Information

{
"version": "1.0.6a5",
"c_extensions present": [
"cprobability",
"cmoment_tensor_conversion"
],
"platform": "darwin",
"num_threads": 4,
"python version": "3.7.4 (default, Aug 13 2019, 15:17:50) \n[Clang 4.0.1 (tags/RELEASE_401/final)]",
"python version info": [
3,
7,
4,
"final",
0
],
"dependency info": {
"numpy": "1.17.2",
"scipy": "1.3.1",
"matplotlib": "3.1.1",
"cython": "0.29.13",
"sphinx": "2.2.0",
"h5py": "2.9.0"
}
}

What error you are getting

1
python setup.py build-docs
invalid command name 'build-docs'
2.
python setup.py testFAILED (errors=1)Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>error: Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>                   3.

import MTfit
MTfit.run_tests()
Traceback (most recent call last):  File "", line 1, in AttributeError: module 'MTfit' has no attribute 'run_tests'

What behavior you would expect

I did not have any error for installing. I created the c files with cython on the src directory and I can import MTfit correctly in terminal and python scipt. But in python it is not recognized aby atribute (eg. MTfit.run() , inversion=MTfit.Inversion(*args,**kwargs) , etc. )

Reproduction steps

What do we need to do to reproduce the issue?
just in a python enviroment write import MTfit and then try to call any attribute MTfit.run_tests()

@FelixRRC
Copy link
Author

It seems that the way of invoking the attributes has changed slightly. I did MTfit.inversion and MTfit.run and it seems that works. However, the issue with the test suite ( python setup.py test ) still fails and I do not know if it's going to be an issue in the future.

@FelixRRC
Copy link
Author

Supposedly MTfit-1.0.6a5-py3.7-macosx-10.9-x86_64.egg is a directory on ../opt/anaconda3/lib/python3.7/site-packages/MTfit-1.0.6a5-py3.7-macosx-10.9-x86_64.egg/MTfit/inversion.py

But my computer shows it as a binary file or something different from a directory. Maybe this is why it does not work for me

@djpugh
Copy link
Owner

djpugh commented Mar 18, 2020

@FelixRRC Apologies for the delay in responding, I’ll try and have a look a bit more to see why this isn’t working this week

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