I am followed the below command:
“” from obspy.clients.fdsn import Client
client = Client(“IRIS”)
from obspy import UTCDateTime
starttime = UTCDateTime(“2002-01-01”)
endtime = UTCDateTime(“2002-01-02”)
cat = client.get_events(starttime=starttime, endtime=endtime, minmagnitude=4, catalog=“ISC”,format=“text”) “”
It raises the below error:"
KeyError Traceback (most recent call last)
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\util\base.py:408, in _read_from_plugin(plugin_type, filename, format, **kwargs)
407 try:
→ 408 format_ep = eps[format]
409 except (KeyError, IndexError):
KeyError: ‘QUAKEML’
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\util\base.py:624, in _generic_reader(pathname_or_url, callback_func, **kwargs)
622 try:
623 # first try reading directly
→ 624 generic = callback_func(pathname_or_url, **kwargs)
625 except TypeError:
626 # if this fails, create a temporary file which is read directly
627 # from the file system
File C:\Anaconda\envs\catalogue\Lib\site-packages\decorator.py:232, in decorate..fun(*args, **kw)
231 args, kw = fix(args, kw, sig)
→ 232 return caller(func, *(extras + args), **kw)
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\util\decorator.py:142, in uncompress_file(func, filename, *args, **kwargs)
141 if not isinstance(filename, str):
→ 142 return func(filename, *args, **kwargs)
143 elif not Path(filename).exists():
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\event\catalog.py:818, in _read(filename, format, **kwargs)
815 “”"
816 Reads a single event file into a ObsPy Catalog object.
817 “”"
→ 818 catalog, format = _read_from_plugin(‘event’, filename, format=format,
819 **kwargs)
820 for event in catalog:
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\util\base.py:411, in _read_from_plugin(plugin_type, filename, format, **kwargs)
410 msg = “Format "%s" is not supported. Supported types: %s”
→ 411 raise TypeError(msg % (format, ', '.join(eps)))
412 # file format should be known by now
TypeError: Format “QUAKEML” is not supported. Supported types:
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\util\base.py:408, in _read_from_plugin(plugin_type, filename, format, **kwargs)
407 try:
→ 408 format_ep = eps[format]
409 except (KeyError, IndexError):
KeyError: ‘QUAKEML’
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
Cell In[48], line 4
2 starttime = UTCDateTime(“2002-01-01”)
3 endtime = UTCDateTime(“2002-01-02”)
----> 4 cat = client.get_events(starttime=starttime, endtime=endtime, minmagnitude=4, catalog=“ISC”,format=“text”)
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\clients\fdsn\client.py:556, in Client.get_events(self, starttime, endtime, minlatitude, maxlatitude, minlongitude, maxlongitude, latitude, longitude, minradius, maxradius, mindepth, maxdepth, minmagnitude, maxmagnitude, magnitudetype, eventtype, includeallorigins, includeallmagnitudes, includearrivals, eventid, limit, offset, orderby, catalog, contributor, updatedafter, filename, **kwargs)
554 data_stream.close()
555 else:
→ 556 cat = obspy.read_events(data_stream, format=“quakeml”)
557 data_stream.close()
558 return cat
File C:\Anaconda\envs\catalogue\Lib\site-packages\decorator.py:232, in decorate..fun(*args, **kw)
230 if not kwsyntax:
231 args, kw = fix(args, kw, sig)
→ 232 return caller(func, *(extras + args), **kw)
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\util\decorator.py:297, in map_example_filename.._map_example_filename(func, *args, **kwargs)
295 except IOError:
296 pass
→ 297 return func(*args, **kwargs)
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\event\catalog.py:810, in read_events(pathname_or_url, format, **kwargs)
808 return _create_example_catalog()
809 else:
→ 810 return _generic_reader(pathname_or_url, _read, format=format, **kwargs)
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\util\base.py:631, in _generic_reader(pathname_or_url, callback_func, **kwargs)
629 with NamedTemporaryFile() as fh:
630 fh.write(pathname_or_url.read())
→ 631 generic = callback_func(fh.name, **kwargs)
632 return generic
633 elif isinstance(pathname_or_url, bytes) and
634 pathname_or_url.strip().startswith(b’<'):
635 # XML string
File C:\Anaconda\envs\catalogue\Lib\site-packages\decorator.py:232, in decorate..fun(*args, **kw)
230 if not kwsyntax:
231 args, kw = fix(args, kw, sig)
→ 232 return caller(func, *(extras + args), **kw)
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\util\decorator.py:208, in uncompress_file(func, filename, *args, **kwargs)
205 result += stream
206 else:
207 # no compressions
→ 208 result = func(filename, *args, **kwargs)
209 return result
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\event\catalog.py:818, in _read(filename, format, **kwargs)
813 @uncompress_file
814 def _read(filename, format=None, **kwargs):
815 “”"
816 Reads a single event file into a ObsPy Catalog object.
817 “”"
→ 818 catalog, format = _read_from_plugin(‘event’, filename, format=format,
819 **kwargs)
820 for event in catalog:
821 event._format = format
File C:\Anaconda\envs\catalogue\Lib\site-packages\obspy\core\util\base.py:411, in _read_from_plugin(plugin_type, filename, format, **kwargs)
409 except (KeyError, IndexError):
410 msg = “Format "%s" is not supported. Supported types: %s”
→ 411 raise TypeError(msg % (format, ', '.join(eps)))
412 # file format should be known by now
413 try:
414 # search readFormat for given entry point
TypeError: Format “QUAKEML” is not supported. Supported types: “”