[obspy-users] (no subject)

Tobias Megies megies at geophysik.uni-muenchen.de
Sat Apr 13 13:01:53 CEST 2013


Hi Rugija,

you have a problem with your ObsPy installation. Note the various
different ObsPy version numbers in the Error Traceback.
It is a mix of old ObsPy packages (with one package per submodule,
version 0.7.x) and the recent ObsPy 0.8.3.

You need to remove all ObsPy stuff < 0.8.3 so that no cross imports
between different version can happen. (I think you should find some
information on manual removing of installed modules in the list archive).

This is only a problem with the version switch from 0.7.x to 0.8.x and
will not be necessary with version updates in the future.

best,
Tobias

On 04/12/2013 12:23 PM, Rugija Kerimova wrote:
> Hello,
> 
> I am a new user in obspy. I work with OpenSuse 12.1(VM) on Windows7
> 
> I cannot read filename.sac
> Then I decided to work with the examples and that's what I got
> 
>>>> st = read("http://examples.obspy.org/ev0_6.a01.gse2")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/usr/local/lib/python2.7/site-packages/obspy-0.8.3_49_g511c8_dirty-py2.7-linux-i686.egg/obspy/core/stream.py",
> line 242, in read
>     st.extend(_read(fh.name <http://fh.name>, format, headonly,
> **kwargs).traces)
>   File
> "/usr/local/lib/python2.7/site-packages/obspy-0.8.3_49_g511c8_dirty-py2.7-linux-i686.egg/obspy/core/util/decorator.py",
> line 152, in wrapped_func
>     result = func(filename, *args, **kwargs)
>   File
> "/usr/local/lib/python2.7/site-packages/obspy-0.8.3_49_g511c8_dirty-py2.7-linux-i686.egg/obspy/core/stream.py",
> line 289, in _read
>     headonly=headonly, **kwargs)
>   File
> "/usr/local/lib/python2.7/site-packages/obspy-0.8.3_49_g511c8_dirty-py2.7-linux-i686.egg/obspy/core/util/base.py",
> line 390, in _readFromPlugin
>     'isFormat')
>   File
> "/usr/local/lib/python2.7/site-packages/distribute-0.6.36-py2.7.egg/pkg_resources.py",
> line 343, in load_entry_point
>     return get_distribution(dist).load_entry_point(group, name)
>   File
> "/usr/local/lib/python2.7/site-packages/distribute-0.6.36-py2.7.egg/pkg_resources.py",
> line 2309, in load_entry_point
>     return ep.load()
>   File
> "/usr/local/lib/python2.7/site-packages/distribute-0.6.36-py2.7.egg/pkg_resources.py",
> line 2015, in load
>     entry = __import__(self.module_name, globals(),globals(), ['__name__'])
>   File
> "/usr/local/lib/python2.7/site-packages/obspy.gse2-0.7.0-py2.7-linux-i686.egg/obspy/gse2/core.py",
> line 7, in <module>
>     from obspy.gse2 import libgse2, libgse1
>   File
> "/usr/local/lib/python2.7/site-packages/obspy.gse2-0.7.0-py2.7-linux-i686.egg/obspy/gse2/libgse2.py",
> line 29, in <module>
>     from obspy.core.util import c_file_p, formatScientific
> ImportError: cannot import name formatScientific
> 
> I tried to take another example from  http://docs.obspy.org/gallery.html
> but get such result:
> 
> 
>>>> from obspy.core import read
>>>> st = read('http://examples.obspy.org/RJOB_061005_072159.ehz.new')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/usr/local/lib/python2.7/site-packages/obspy-0.8.3_49_g511c8_dirty-py2.7-linux-i686.egg/obspy/core/stream.py",
> line 242, in read
>     st.extend(_read(fh.name <http://fh.name>, format, headonly,
> **kwargs).traces)
>   File
> "/usr/local/lib/python2.7/site-packages/obspy-0.8.3_49_g511c8_dirty-py2.7-linux-i686.egg/obspy/core/util/decorator.py",
> line 152, in wrapped_func
>     result = func(filename, *args, **kwargs)
>   File
> "/usr/local/lib/python2.7/site-packages/obspy-0.8.3_49_g511c8_dirty-py2.7-linux-i686.egg/obspy/core/stream.py",
> line 289, in _read
>     headonly=headonly, **kwargs)
>   File
> "/usr/local/lib/python2.7/site-packages/obspy-0.8.3_49_g511c8_dirty-py2.7-linux-i686.egg/obspy/core/util/base.py",
> line 390, in _readFromPlugin
>     'isFormat')
>   File
> "/usr/local/lib/python2.7/site-packages/distribute-0.6.36-py2.7.egg/pkg_resources.py",
> line 343, in load_entry_point
>     return get_distribution(dist).load_entry_point(group, name)
>   File
> "/usr/local/lib/python2.7/site-packages/distribute-0.6.36-py2.7.egg/pkg_resources.py",
> line 2309, in load_entry_point
>     return ep.load()
>   File
> "/usr/local/lib/python2.7/site-packages/distribute-0.6.36-py2.7.egg/pkg_resources.py",
> line 2015, in load
>     entry = __import__(self.module_name, globals(),globals(), ['__name__'])
>   File
> "/usr/local/lib/python2.7/site-packages/obspy.gse2-0.7.0-py2.7-linux-i686.egg/obspy/gse2/core.py",
> line 7, in <module>
>     from obspy.gse2 import libgse2, libgse1
>   File
> "/usr/local/lib/python2.7/site-packages/obspy.gse2-0.7.0-py2.7-linux-i686.egg/obspy/gse2/libgse2.py",
> line 29, in <module>
>     from obspy.core.util import c_file_p, formatScientific
> ImportError: cannot import name formatScientific
> 
> Has anyone explained to me the reason for my bad luck. Distribute and
> package I just today updated, but the result is still the same.
> 
> 
> Regards,
> Rugija
> 
> 
> _______________________________________________
> obspy-users mailing list
> obspy-users at lists.sevor.de
> http://lists.obspy.org/cgi-bin/mailman/listinfo/obspy-users

-- 
Dipl.-Geophys. Tobias Megies

Geophysikalisches Observatorium
Ludwigshöhe 8
82256 Fürstenfeldbruck

Ludwig-Maximilians-Universität
Department für Geo- und Umweltwissenschaften
Sektion Geophysik
Theresienstrasse 41/IV
80333 München

Tel: +49 (0) 89 2180-73981
     +49 (0) 89 2180-4326
Mail: tobias.megies at geophysik.uni-muenchen.de




More information about the obspy-users mailing list