load data

Hi, I am new to obspy and need some help getting started. I'm running it on windows at the moment and cant seem to load any data. I use the syntax

from obspy.core import read
st = load("/Users/David/Desktop/UEASK_252.mseed")
print st

but I keep getting the following error

Traceback (most recent call last):
   File "C:\Users\David\Desktop\obs2.py", line 6, in <module>
     st = read("/Users/David/Desktop/UEASK_252.mseed")
   File "C:\Python27\lib\site-packages\obspy\core\stream.py", line 196, in read
     st.extend(_read(file, format, headonly, **kwargs).traces)
   File "C:\Python27\lib\site-packages\obspy\core\util\decorator.py", line 138, in wrapped_func
     result = func(filename, *args, **kwargs)
   File "C:\Python27\lib\site-packages\obspy\core\stream.py", line 274, in _read
     raise TypeError(msg + ', '.join([_i.name for _i in ENTRY_POINTS]))
TypeError: Format is not supported. Supported Formats: SLIST, TSPAIR

Anyone able to help??
Thanks
D

There is a problem with your installation.
Please go to the Installation Instructions page, download the Microsoft
installer and run the installation again.
You can also execute "Run test suite" (from the start menu folder
"ObsPy") after that to make sure all modules are installed OK.

best,
Tobias

Try this:

from obspy.core import read
st = read("/Users/David/Desktop/UEASK_252.mseed")
print st

Cheers

Tobi:

I am just wondering: he imports read and then calls load().

load() is actually not defined on my system, so how can he get this message?

confused
Martin

Hi,

the module obspy.mseed is missing - seems like only obspy.core is
installed as only the two ASCII formats shipping with obspy.core are
offered. Also I guess the "load()" is just a typo and he means "read()" :wink:

So try using the ObsPy Windows Installer
(Home · obspy/obspy Wiki · GitHub) as Tobias pointed out and
report back if its still not working.

Cheers,
Robert

Tobi:

I am just wondering: he imports read and then calls load().

load() is actually not defined on my system, so how can he get
this message?

confused Martin

There is a problem with your installation. Please go to the
Installation Instructions page, download the Microsoft installer
and run the installation again. You can also execute "Run test
suite" (from the start menu folder "ObsPy") after that to make
sure all modules are installed OK.

best, Tobias

Hi, I am new to obspy and need some help getting started. I'm
running it on windows at the moment and cant seem to load any
data. I use the syntax

from obspy.core import read st =
load("/Users/David/Desktop/UEASK_252.mseed") print st

but I keep getting the following error

Traceback (most recent call last): File
"C:\Users\David\Desktop\obs2.py", line 6, in<module> st =
read("/Users/David/Desktop/UEASK_252.mseed") File
"C:\Python27\lib\site-packages\obspy\core\stream.py", line
196, in read st.extend(_read(file, format, headonly,
**kwargs).traces) File
"C:\Python27\lib\site-packages\obspy\core\util\decorator.py",
line 138, in wrapped_func result = func(filename, *args,
**kwargs) File
"C:\Python27\lib\site-packages\obspy\core\stream.py", line
274, in _read raise TypeError(msg + ', '.join([_i.name for _i
in ENTRY_POINTS])) TypeError: Format is not supported.
Supported Formats: SLIST, TSPAIR

Anyone able to help?? Thanks D

_______________________________________________ obspy-users
mailing list obspy-users@lists.sevor.de
ObsPy Forum

_______________________________________________ obspy-users mailing
list obspy-users@lists.sevor.de
ObsPy Forum

- --
Dr. Robert Barsch

Ludwig-Maximilians-Universität München
Department of Earth and Environmental Sciences, Geophysics
Theresienstr. 41/IV
D-80333 Munich
Germany

Tel: +49 (0) 89 2180 4201
Fax: +49 (0) 89 2180 9942010
Mail: barsch@geophysik.uni-muenchen.de

I did not notice the load() in the code quote which of course makes no
sense. However the error message clearly states a call to read() so this
is just a mistake in posting the actually executed code.

The message clearly indicates that none of the waveform I/O plugins are
installed properly, so the installation is broken or never worked
properly in the first place. As I wrote, please reinstall with the
*current* Windows installer (the installer was broken a couple of weeks
ago) available on the website. I tried it just yesterday and it worked fine.

best,
Tobias

Hi again, reinstalled with the .exe from website (which was what I had done originally) but still have the same problem. Any other ideas?

Hi David,

looking at your error message I can see that obspy.core is installed
as system python package in "C:\Python27\lib\site-packages\" - but the
installer instead should install it into a virtual environment which
is located in your home directory, e.g. "C:\Users\David". So this is
very odd - so here some questions to tackle this issue:

(1) Which Windows OS: Vista, 7, 32/64 bit ?
(2) Did you try to install ObsPy not using the installer beforehand?
If yes what did you do exactly?
(3) Which ObsPy modules are listed in "C:\Python27\lib\site-packages\"
(4) Does "C:\Users\David\obspy" exist - and if yes what is the content
of that.

Sorry for all the questions - but as I don't have access on your
machine - its very hard to debug such problems :wink:

Cheers,
Robert

Hi again, reinstalled with the .exe from website (which was what I
had done originally) but still have the same problem. Any other
ideas?

from obspy.core import read st =
load("/Users/David/Desktop/UEASK_252.mseed") print st

but I keep getting the following error

Traceback (most recent call last): File
"C:\Users\David\Desktop\obs2.py", line 6, in<module> st =
read("/Users/David/Desktop/UEASK_252.mseed") File
"C:\Python27\lib\site-packages\obspy\core\stream.py", line
196, in read st.extend(_read(file, format, headonly,
**kwargs).traces) File
"C:\Python27\lib\site-packages\obspy\core\util\decorator.py",

line 138, in wrapped_func

(1) I'm using windows 7.

(2) I originally used the .exe from the website for install, but had an error saying 'No module named core' when I tried to load data. I then downloaded the core module. Then uninstalled obspy and deleted "C:\Python27\lib\site-packages\core" and ran the .exe again. Which has me back where I started with the 'No module named core' error.

(3) "C:\Python27\lib\site-packages\" contains...
       C:\Python27\Lib\site-packages>dir
Volume in drive C has no label.
Volume Serial Number is 7ECA-6003

Directory of C:\Python27\Lib\site-packages

19/12/2011 16:50 <DIR> .
19/12/2011 16:50 <DIR> ..
18/12/2011 14:52 <DIR> adodbapi
19/12/2011 16:08 <DIR> dateutil
19/12/2011 16:31 <DIR> distribute-0.6.24-py2.7.egg
18/12/2011 14:54 246 easy-install.pth
18/12/2011 14:52 <DIR> isapi
19/12/2011 16:08 <DIR> lxml
18/12/2011 14:53 <DIR> lxml-2.3.2-py2.7.egg-info
19/12/2011 16:08 <DIR> matplotlib
06/10/2011 11:14 619 matplotlib-1.1.0-py2.7.egg-info
18/12/2011 14:53 <DIR> mpl_toolkits
19/12/2011 16:07 <DIR> numpy
07/08/2011 17:29 1,696 numpy-1.6.1-py2.7.egg-info
30/11/2011 18:49 296 obspy.core-0.5.0-py2.6-nspkg.pth
19/12/2011 11:19 <DIR> obspy.core-0.5.0-py2.6.egg-info
06/10/2011 07:50 90 pylab.py
18/12/2011 14:53 237 pylab.pyc
18/12/2011 14:53 237 pylab.pyo
19/12/2011 11:14 <DIR> PyQt4
26/01/2004 22:01 141 pythoncom.py
18/12/2011 14:52 245 pythoncom.pyc
18/12/2011 14:52 245 pythoncom.pyo
18/12/2011 14:52 <DIR> pythonwin
18/12/2011 14:53 <DIR> pytz
27/02/2011 16:22 450 pywin32-216-py2.7.egg-info
27/02/2011 14:00 2,384,226 PyWin32.chm
10/10/2004 20:06 69 pywin32.pth
27/02/2011 15:43 5 pywin32.version.txt
18/12/2011 14:52 <DIR> pywin32_system32
08/03/2011 09:45 121 README.txt
18/12/2011 14:52 <DIR> scipy
13/11/2011 10:46 1,805 scipy-0.10.0-py2.7.egg-info
18/12/2011 14:51 153 setuptools-0.6c11-py2.7.egg-info
19/12/2011 16:31 31 setuptools.pth
01/11/2011 00:21 87,552 sip.pyd
01/11/2011 00:20 93,551 sipconfig.py
24/10/2011 18:00 5,877 sipdistutils.py
18/12/2011 14:54 <DIR> virtualenv-1.7-py2.7.egg
18/12/2011 14:52 <DIR> win32
18/12/2011 14:52 <DIR> win32com
18/12/2011 14:52 <DIR> win32comext
              21 File(s) 2,577,892 bytes
              21 Dir(s) 183,553,724,416 bytes free

(4) "C:\Users\David\obspy" contains
Include
Lib
Scripts
uninstall

Thanks,
David

Hi David,

ok a test run on my win7 64 box installing it a second time failed too
- - I'll was always testing on clean Vista and WinXP machines - but
there seems to be a bug in the installer which I have to figure out
yet - I'll contact you if its fixed.

Sorry for that and thanks for reporting.

Robert

- --
Dr. Robert Barsch

Ludwig-Maximilians-Universität München
Department of Earth and Environmental Sciences, Geophysics
Theresienstr. 41/IV
D-80333 Munich
Germany

Tel: +49 (0) 89 2180 4201
Fax: +49 (0) 89 2180 9942010
Mail: barsch@geophysik.uni-muenchen.de

Thanks

Hi David,

I updated the installer - some minor bugs mostly related to updated
versions of some dependencies. Also the uninstall routine didn't work
correctly. I just tested the new installer on WinXP (32bit), Vista
(32bit) and 7 (64bit) and it worked like a charm - so hopefully for
you too :wink:

So please uninstall all ObsPy related packages in order to have a
"clean" system. Additionally check for the following folders/files and
delete them if they exists:

C:\Python27\Lib\site-packages\obspy.core-0.5.0-py2.6.egg-info\
C:\Python27\Lib\site-packages\obspy.core-0.5.0-py2.6-nspkg.pth
C:\Python27\Scripts\obspy-*.py
C:\Python27\Scripts\obspy-*.pyc
C:\Python27\Scripts\obspy-*.exe
C:\Users\David\obspy\

Remove also the ObsPy folder in the start menu. Finally delete any
reference to ObsPy within the file
C:\Python27\Lib\site-packages\easy-install.pth using a text editor -
just delete any line containing obspy.

After that download the updated version of obspy-setup.exe from the
homepage and install again. Once it is installed you should have a
ObsPy entry in the start menu - select IPython and try to run the
examples.

Hope it works + cheers,

Robert

PS: I know the "cleanup procedure" sounds pretty nasty - but mixing
ObsPy packages in system and a virtual environment is a really bad
idea - I primary want to eliminate possible error sources. Once
everything is set up the "right" way you only have to rerun the
installer to update packages and dependencies. So you don't have to
download + install each packages manually. The installer will also
skip existing/up-to-date packages.

- --
Dr. Robert Barsch

Ludwig-Maximilians-Universität München
Department of Earth and Environmental Sciences, Geophysics
Theresienstr. 41/IV
D-80333 Munich
Germany

Tel: +49 (0) 89 2180 4201
Fax: +49 (0) 89 2180 9942010
Mail: barsch@geophysik.uni-muenchen.de