[obspy-users] import rotate_NE_RT

luigia at geophysik.uni-kiel.de luigia at geophysik.uni-kiel.de
Thu Apr 12 13:16:47 CEST 2012


It works,
thanks

Luigia



> Hello Luigia,
>
> yes it has been fixed in more recent ObsPy versions. You would need to
> update
> to the repository version of ObsPy until we release a new version.
>
> If that is not possible for whatever reason the simplest fix is just to
> update matplotlib
> to their latest stable version 1.1.0 which will work fine with your ObsPy
> version.
>
> If that is also not possible you can also use a little hack.
> Before you import obspy just do the following:
>
> import matplotlib
> matplotlib.__version__ = "1.1.0"
>
> Best wishes,
>
> Lion
>
>
>
> On Apr 11, 2012, at 12:02 , luigia at geophysik.uni-kiel.de wrote:
>
>> Hi all,
>> I cannot import anymore the  obspy function rotate_NE_RT
>>
>> It works with matplotlib version     0.99.3-1
>> no more with version         1.1.1~rc1-1
>>
>> Below is the error message I got.
>> Could anyone help me to fix it?
>>
>> Thanks
>>
>> Luigia
>>
>>
>>
>>
>> from obspy.signal.rotate import rotate_NE_RT
>> ---------------------------------------------------------------------------
>> ValueError                                Traceback (most recent call
>> last)
>> /home/luigia/<ipython-input-1-5c96568c071f> in <module>()
>> ----> 1 from obspy.signal.rotate import rotate_NE_RT
>>
>> /usr/local/lib/python2.7/dist-packages/obspy.signal-0.6.1-py2.7-linux-x86_64.egg/obspy/signal/__init__.py
>> in <module>()
>>    195 from hoctavbands import sonogram
>>    196 from polarization import eigval
>> --> 197 from psd import psd, PPSD
>>    198 from konnoohmachismoothing import konnoOhmachiSmoothing
>>    199
>>
>> /usr/local/lib/python2.7/dist-packages/obspy.signal-0.6.1-py2.7-linux-x86_64.egg/obspy/signal/psd.py
>> in <module>()
>>     31
>>     32
>> ---> 33 MATPLOTLIB_VERSION = getMatplotlibVersion()
>>     34
>>     35
>>
>> /usr/local/lib/python2.7/dist-packages/obspy.core-0.6.2-py2.7.egg/obspy/core/util/base.pyc
>> in getMatplotlibVersion()
>>    371         import matplotlib
>>    372         version = matplotlib.__version__.replace('svn', '')
>> --> 373         version = map(int, version.split("."))
>>    374     except ImportError:
>>    375         version = None
>>
>> ValueError: invalid literal for int() with base 10: '1rc'
>>
>>
>>
>>
>> Probably obspy has to be adapted in order to be able to work with the
>> new matplotlib. Could be this problem:
>>
>> http://obspy.org/changeset/3609/obspy
>>
>>
>> _______________________________________________
>> obspy-users mailing list
>> obspy-users at lists.sevor.de
>> http://lists.obspy.org/cgi-bin/mailman/listinfo/obspy-users
>
>
> _______________________________________________
> obspy-users mailing list
> obspy-users at lists.sevor.de
> http://lists.obspy.org/cgi-bin/mailman/listinfo/obspy-users
>






More information about the obspy-users mailing list