krischer / instaseis

Instant high-frequency seismograms from an AxiSEM database
http://instaseis.net
Other
52 stars 23 forks source link

OS X installation ok but tests failed #47

Closed adakite closed 6 years ago

adakite commented 8 years ago

Hi

I encounter some issues with my system (macbook pro running Darwin Kernel Version 15.6.0).

Installation went smoothly but the tests failed:

python -m instaseis.tests gave me this:

anaconda/lib/python2.7/site-packages/instaseis/tests/test_server_finite_source.py F
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/main.py", line 96, in wrap_session
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/main.py", line 131, in _main
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/main.py", line 152, in pytest_runtestloop
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 254, in _wrapped_call
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 280, in get_result
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/runner.py", line 66, in pytest_runtest_protocol
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/runner.py", line 73, in runtestprotocol
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/runner.py", line 135, in call_and_report
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 250, in _wrapped_call
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/skipping.py", line 222, in pytest_runtest_makereport
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 280, in get_result
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/runner.py", line 275, in pytest_runtest_makereport
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/python.py", line 590, in _repr_failure_py
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/main.py", line 433, in _repr_failure_py
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/_code/code.py", line 424, in getrepr
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/_code/code.py", line 618, in repr_excinfo
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/_code/code.py", line 608, in repr_traceback
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/_code/code.py", line 555, in repr_traceback_entry
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/_code/code.py", line 480, in _getentrysource
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/_code/code.py", line 206, in getsource
INTERNALERROR>   File "/Users/alucas/anaconda/lib/python2.7/site-packages/_pytest/_code/source.py", line 349, in getstatementrange_ast
INTERNALERROR> LookupError: unknown encoding: utf-32-be

======================================== 1 failed, 306 passed, 2 skipped, 1 pytest-warnings in 42.80 seconds ========================================

Any ideas on what is causing this? Thanks

krischer commented 8 years ago

That is a very curious error to be honest. I think it means Python does not know the utf-32-be encoding.

Can you run

'test'.encode('utf-32-be')

in a Python shell?

I assume you installed Python + instaseis via anaconda (judging from your path). Maybe updating Python fixes the problem?

Or you just have very unusual locale settings? Mine for example are

$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
adakite commented 8 years ago

Hi, 'test'.encode('utf-32-be') gives me this: Out[4]: '\x00\x00\x00t\x00\x00\x00e\x00\x00\x00s\x00\x00\x00t' locate gives

$ locale

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

and yes Python + instaseis are installed from anaconda. Python is updated.

krischer commented 8 years ago

Hmm. Really strange and I don't know what causes the error and I also unfortunately cannot reproduce it. Can you maybe also report this at the pytest respository (https://github.com/pytest-dev/pytest)? Maybe they know what's up?

Can you actually run instaseis and are only the tests failing? But yea - to be confident that instaseis works on your laptop you definitely want to pass all tests...

krischer commented 6 years ago

No news for 18 months. Please reopen if this is still a problem.