Obspy: I am using obspy 1.1.1 with Python 3.6. I have been able use it for past few weeks without any issues and recently I am getting this error message

Created on 4 Sep 2019  路  5Comments  路  Source: obspy/obspy

  • Please check whether the bug was already reported or fixed.
  • Please provide the following information:

    • ObsPy version, Python version and Platform (Windows, OSX, Linux ...)

    • How did you install ObsPy and Python (pip, anaconda, from source ...)

    • If possible please supply a short, self contained, correct example that

      demonstrates the issue.

    • If this is a regression (used to work in an earlier version of ObsPy),

      please note when it used to work.

  • Please take the time to format your ticket appropriately
    (e.g. put error tracebacks into code blocks)
question

Most helpful comment

Your problem is probably connected with a wrong version of pyproj library that you have installed. It should be in version 1.9.5.1. I would recommend to install obspy through conda, conda usually install all the dependencies in proper version.
Could you post your pip list?

All 5 comments

@nishr Can you please fill the form in above.

Obspy 1.1.1 Python 3.6 Linux-CentOS
I installed Obspy using Pip

The error message
quakedetect) [nishath@master IO]$ python DataPreparation.py
Traceback (most recent call last):
File "DataPreparation.py", line 13, in
from PSgenerator import PSWriter
File "/home/nishath/QuakeDetection/IO/PSgenerator.py", line 10, in
from obspy.core import UTCDateTime
File "/home/nishath/.local/lib/python3.6/site-packages/obspy/__init__.py", line 39, in
from obspy.core.utcdatetime import UTCDateTime # NOQA
File "/home/nishath/.local/lib/python3.6/site-packages/obspy/core/__init__.py", line 125, in
from obspy.core.util.attribdict import AttribDict # NOQA
File "/home/nishath/.local/lib/python3.6/site-packages/obspy/core/util/__init__.py", line 27, in
from obspy.core.util.base import (ALL_MODULES, DEFAULT_MODULES,
File "/home/nishath/.local/lib/python3.6/site-packages/obspy/core/util/base.py", line 397, in
PROJ4_VERSION = get_proj_version()
File "/home/nishath/.local/lib/python3.6/site-packages/obspy/core/util/base.py", line 383, in get_proj_version
version_string = str(Proj(proj='utm', zone=10, ellps='WGS84').proj_version)
AttributeError: 'Proj' object has no attribute 'proj_version'

The program worked fine in a Pypi channel installation but not in a conda-forge.

Your problem is probably connected with a wrong version of pyproj library that you have installed. It should be in version 1.9.5.1. I would recommend to install obspy through conda, conda usually install all the dependencies in proper version.
Could you post your pip list?

After installing the pyproj 1.9.5.1, the problem was resolved. Thank you very much.
My pip list.
(Obspy) [nishath@master ~]$ pip list
Package Version


absl-py 0.8.0
asn1crypto 0.24.0
astor 0.7.1
basemap 1.2.0
certifi 2019.6.16
cffi 1.12.3
chardet 3.0.4
cryptography 2.7
cycler 0.10.0
decorator 4.4.0
future 0.17.1
gast 0.2.2
grpcio 1.22.0
h5py 2.9.0
idna 2.8
importlib-metadata 0.20
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
kiwisolver 1.1.0
librosa 0.7.0
lxml 4.4.1
Markdown 3.1.1
matplotlib 3.1.1
mock 3.0.5
more-itertools 7.2.0
numba 0.45.1
numpy 1.17.1
obspy 1.1.1
packaging 19.1
pandas 0.25.1
Pillow 6.1.0
pip 19.2.3
protobuf 3.9.1
pycparser 2.19
pyOpenSSL 19.0.0
pyparsing 2.4.2
pyproj 1.9.5.1
pyshp 2.1.0
PySocks 1.7.0
pytest 5.1.2
python-dateutil 2.8.0
pytz 2019.2
requests 2.22.0
resampy 0.2.2
scikit-learn 0.21.3
scipy 1.3.1
setuptools 41.2.0
six 1.12.0
SQLAlchemy 1.3.8
tensorboard 1.13.1
tensorflow 1.13.1
tensorflow-estimator 1.13.0
termcolor 1.1.0
tornado 6.0.3
tqdm 4.35.0
urllib3 1.25.3
Werkzeug 0.15.5
wheel 0.33.6
zipp 0.6.0

You're welcome. I'm closing since the issue is resolved.

Was this page helpful?
0 / 5 - 0 ratings