Closed alkirkby closed 6 years ago
It just happened to me again, this time 'numpy' has been set to NoneType. Same code. Not sure what's going on here...
Please take a look at this:
https://stackoverflow.com/questions/44061754/package-load-error-in-anaconda-and-spyder
It looks like this may be what's happening and may be something specific to spyder.
Here's a remedy perhaps:
https://stackoverflow.com/questions/13876306/spyder-umd-has-deleted-module
I don't have spyder installed, so can't really test immediately..
Thanks, I will try this.
please note that this UMD and using reload
in the python code could also be the cause of the "broken inheritance" issues, that, sometimes, an error message is displayed saying
unbound method must be called with instance
for all the plotting classes under mtpy.imaging
which inherits mtpy.imaging.mtplottools.PlotSettings
, mtpy.imaging.mtplottools.MTArrows
and/or mtpy.imaging.mtplottools.MTEllipse
.
Done.
Somewhere in mtpy, np is set to None, so that when you want to call numpy functions, it can't find them currently trying to run the following code in spyder, it usually happens after I have run it more than once.
Your Environment
Installed Python Packages: alabaster 0.7.10 py27_0 conda-forge asn1crypto 0.22.0 py27_0 conda-forge babel 2.4.0 py27_0 conda-forge backports.shutil_get_terminal_size 1.0.0 py27_1 conda-forge backports_abc 0.5 py27_0 conda-forge bleach 2.0.0 py27_0 conda-forge ca-certificates 2017.7.27.1 0 conda-forge certifi 2017.7.27.1 py27_0 conda-forge cffi 1.10.0 py27_0 conda-forge chardet 3.0.4 py27_0 conda-forge click 6.7 py27_0 conda-forge click-plugins 1.0.3 py27_0 conda-forge cligj 0.4.0 py27_0 conda-forge colorama 0.3.9 py27_0 conda-forge configparser 3.5.0 py27_0 conda-forge cryptography 2.0.3 py27_0 conda-forge curl 7.49.1 vc9_2 [vc9] conda-forge cycler 0.10.0 py27_0 conda-forge decorator 4.1.2 py27_0 conda-forge descartes 1.1.0 py27_0 conda-forge docutils 0.14 py27_0 conda-forge entrypoints 0.2.3 py27_1 conda-forge enum34 1.1.6 py27_1 conda-forge expat 2.2.1 vc9_0 [vc9] conda-forge fiona 1.7.9 py27_1 conda-forge freetype 2.7 vc9_1 [vc9] conda-forge freexl 1.0.2 vc9_2 [vc9] conda-forge funcsigs 1.0.2 py_2 conda-forge functools32 3.2.3.2 py27_1 conda-forge future 0.16.0 py27_0 conda-forge gdal 2.1.3 py27_vc9_5 [vc9] conda-forge geopandas 0.3.0 py27_0 conda-forge geos 3.5.1 vc9_1 [vc9] conda-forge hdf4 4.2.12 vc9_0 [vc9] conda-forge hdf5 1.8.18 vc9_1 [vc9] conda-forge html5lib 0.999999999 py27_0 conda-forge icu 58.1 vc9_1 [vc9] conda-forge idna 2.5 py27_0 conda-forge imagesize 0.7.1 py27_0 conda-forge ipaddress 1.0.18 py27_0 conda-forge ipykernel 4.6.1 py27_0 conda-forge ipython 5.4.1 py27_0 conda-forge ipython_genutils 0.2.0 py27_0 conda-forge ipywidgets 7.0.5 py27_0 conda-forge jedi 0.10.2 py27_0 conda-forge jinja2 2.9.6 py27_0 conda-forge jpeg 9b vc9_0 [vc9] conda-forge jsonschema 2.5.1 py27_0 conda-forge jupyter 1.0.0 py27_0 conda-forge jupyter_client 5.1.0 py27_0 conda-forge jupyter_console 5.2.0 py27_0 conda-forge jupyter_core 4.3.0 py27_0 conda-forge kealib 1.4.7 vc9_2 [vc9] conda-forge krb5 1.14.2 vc9_0 [vc9] conda-forge libiconv 1.14 vc9_4 [vc9] conda-forge libnetcdf 4.4.1.1 vc9_6 [vc9] conda-forge libpng 1.6.28 vc9_1 [vc9] conda-forge libpq 9.6.3 vc9_0 [vc9] conda-forge libspatialindex 1.8.5 vc9_1 [vc9] conda-forge libspatialite 4.3.0a vc9_15 [vc9] conda-forge libtiff 4.0.6 vc9_7 [vc9] conda-forge libxml2 2.9.3 vc9_9 [vc9] conda-forge libxslt 1.1.29 vc9_5 [vc9] conda-forge lxml 3.8.0 py27_0 conda-forge markupsafe 1.0 py27_0 conda-forge matplotlib 1.5.3 np112py27_8 conda-forge mistune 0.7.4 py27_0 conda-forge mkl 2017.0.3 0 mock 2.0.0 py27_0 conda-forge munch 2.2.0 py27_0 conda-forge nbconvert 5.2.1 py27_1 conda-forge nbformat 4.3.0 py27_0 conda-forge notebook 5.2.2 py27_1 conda-forge numpy 1.12.1 py27_0 obspy 1.0.3 py27_1 conda-forge olefile 0.44 py27_0 conda-forge openjpeg 2.2.0 vc9_0 [vc9] conda-forge openssl 1.0.2l vc9_0 [vc9] conda-forge pandas 0.20.3 py27_1 conda-forge pandoc 1.19.2 0 conda-forge pandocfilters 1.4.1 py27_0 conda-forge pathlib2 2.3.0 py27_0 conda-forge pbr 3.1.1 py27_0 conda-forge pcre 8.39 vc9_0 [vc9] conda-forge pep8 1.7.0 py27_0 conda-forge pickleshare 0.7.4 py27_0 conda-forge pillow 4.2.1 py27_1 conda-forge pip 9.0.1 py27_0 conda-forge proj4 4.9.3 vc9_4 [vc9] conda-forge prompt_toolkit 1.0.15 py27_0 conda-forge psutil 5.2.2 py27_0 conda-forge psycopg2 2.7.3 py27_0 conda-forge pycparser 2.18 py27_0 conda-forge pyflakes 1.6.0 py27_0 conda-forge pygments 2.2.0 py27_0 conda-forge pyopenssl 17.2.0 py27_0 conda-forge pyparsing 2.2.0 py27_0 conda-forge pyproj 1.9.5.1 py27_0 conda-forge pyqt 4.11.4 py27_2 conda-forge pysal 1.13.0 py27_0 conda-forge pysocks 1.6.7 py27_0 conda-forge python 2.7.13 1 conda-forge python-dateutil 2.6.1 py27_0 conda-forge pytz 2017.2 py27_0 conda-forge pyyaml 3.12 py27_1 conda-forge pyzmq 16.0.2 py27_2 conda-forge qt 4.8.7 vc9_6 [vc9] conda-forge qtconsole 4.3.1 py27_0 conda-forge requests 2.18.4 py27_1 conda-forge rope 0.10.7 py27_0 conda-forge rtree 0.8.3 py27_0 conda-forge scandir 1.5 py27_1 conda-forge scipy 0.19.1 np112py27_0 setuptools 36.3.0 py27_0 conda-forge shapely 1.6.1 py27_1 conda-forge simplegeneric 0.8.1 py27_0 conda-forge singledispatch 3.4.0.3 py27_0 conda-forge sip 4.18 py27_1 conda-forge six 1.10.0 py27_1 conda-forge snowballstemmer 1.2.1 py27_0 conda-forge sphinx 1.6.3 py27_0 conda-forge sphinxcontrib-websupport 1.0.1 py27_0 conda-forge spyder 2.3.9 py27_2 conda-forge sqlalchemy 1.1.13 py27_0 conda-forge sqlite 3.13.0 vc9_1 [vc9] conda-forge ssl_match_hostname 3.5.0.1 py27_1 conda-forge testpath 0.3.1 py27_0 conda-forge tornado 4.5.2 py27_0 conda-forge traitlets 4.3.2 py27_0 conda-forge typing 3.6.2 py27_0 conda-forge urllib3 1.22 py27_0 conda-forge vc 9 0 conda-forge vs2008_runtime 9.00.30729.5054 0 wcwidth 0.1.7 py27_0 conda-forge webencodings 0.5 py27_0 conda-forge wheel 0.29.0 py27_0 conda-forge widgetsnbextension 3.0.8 py27_0 conda-forge win_inet_pton 1.0.1 py27_1 conda-forge win_unicode_console 0.5 py27_0 conda-forge wincertstore 0.2 py27_0 conda-forge xerces-c 3.1.4 vc9_3 [vc9] conda-forge yaml 0.1.6 vc9_0 [vc9] conda-forge zlib 1.2.8 vc9_3 [vc9] conda-forge