error message can not import taup

24 views
Skip to first unread message

Yochai Ben Horin

unread,
Jan 21, 2018, 5:58:01 AM1/21/18
to pisces-db
Hello,

I am trying to upload the pisces :

from pisces import Route, AppContainer, Router

and I'm getting:

mportError                               Traceback (most recent call last)
<ipython-input-35-c38ea7eb03ba> in <module>()
----> 1 from pisces import Route, AppContainer, Router

/usr/local/anaconda/lib/python2.7/site-packages/pisces/__init__.py in <module>()
     20 __version__ = '0.2.3'
     21 
---> 22 from pisces.util import db_connect, get_tables, travel_times, make_table
     23 from pisces.schema.util import string_formatter
     24 from pisces.io.trace import wfdisc2trace

/usr/local/anaconda/lib/python2.7/site-packages/pisces/util.py in <module>()
     16 import obspy.geodetics as geod
     17 from obspy.core import AttribDict
---> 18 from obspy.taup import taup
     19 
     20 from pisces.schema.util import PiscesMeta

ImportError: cannot import name taup

I can load import taup but I have all other components of obspy.taup.


Thanks

Yochai 

Jonathan MacCarthy

unread,
Jan 21, 2018, 1:43:53 PM1/21/18
to Yochai Ben Horin, pisces-db
Hi Yochai,

I’m a bit confused about your error message.  I see two potential problems.  1) your version of OpsPy is new enough that it doesn’t have obspy.taup.taup anymore.  It has been replaced by TauPyModel (https://docs.obspy.org/packages/autogen/obspy.taup.tau.TauPyModel.html).  Also your version of Pisces needs to be updated to reflect that API change in ObsPy.  Pisces version 0.2.4 or 0.2.6 should work.  Try “pip uninstall pisces-db” and “pip install -U pisces”
2) Pisces has no Route, AppContainer, or Router classes.  You may be getting confused with another project that used to be on PyPI called “pisces”.  That project doesn’t exist anymore on PyPI, so you can uninstall pisces and reinstall it to be sure you’ve got the seismic “pisces.”

Please let me know if this does/doesn’t work.

Best,
Jon


From: pisc...@googlegroups.com <pisc...@googlegroups.com> on behalf of Yochai Ben Horin <yochai....@gmail.com>
Sent: Sunday, January 21, 2018 3:58:01 AM
To: pisces-db
Subject: error message can not import taup
 
--
You received this message because you are subscribed to the Google Groups "pisces-db" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pisces-db+...@googlegroups.com.
To post to this group, send email to pisc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pisces-db/455ed66e-f21c-4f54-b842-282e38ef0698%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages