You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jamesorr and I have found an interesting side effect in cdms2 yesterday
We could not import cdms2 because of a weird error, and we were lucky to find out that James had a buggy test.py file in the directory where we were executing his script. For some reason, cdms2 or something imports test.py, except that it was not getting it from the right place, or something like that
Example below
(cdatm_py2) jypeter@obelix4 - ...jypeter - 51 >cat test.py
#!/usr/bin/env python
print "You are in test.py"
stop_right_now
(cdatm_py2) jypeter@obelix4 - ...jypeter - 52 >python
Python 2.7.15 | packaged by conda-forge | (default, Feb 28 2019, 04:00:11)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/home/users/jypeter/CDAT/Progs/Devel', '/home/users/jypeter/CDAT/Progs', '/home/share/unix_files/cdat/climaf', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python27.zip', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/plat-linux2', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/lib-tk', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/lib-old', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/lib-dynload', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/site-packages', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/site-packages/DV3D-8.1-py3.7.egg', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/site-packages/WK-8.1-py3.7.egg', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/site-packages/cdat_info-8.0-py3.7.egg', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/site-packages/cdutil-8.0-py3.7.egg', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/site-packages/thermo-8.1-py3.7.egg', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/site-packages/vcs-8.1-py3.7.egg', '/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/site-packages/vcsaddons-8.1-py2.7-linux-x86_64.egg']
>>> import cdms2
You are in test.py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/site-packages/cdms2/__init__.py", line 25, in <module>
from .axis import AbstractAxis, axisMatches, axisMatchAxis, axisMatchIndex # noqa
File "/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/site-packages/cdms2/axis.py", line 23, in <module>
standard_library.install_aliases()
File "/home/share/unix_files/cdat/miniconda3/envs/cdatm_py2/lib/python2.7/site-packages/future/standard_library/__init__.py", line 485, in install_aliases
import test
File "test.py", line 4, in <module>
stop_right_now
NameError: name 'stop_right_now' is not defined
>>>
The text was updated successfully, but these errors were encountered:
@jamesorr and I have found an interesting side effect in cdms2 yesterday
We could not
import cdms2
because of a weird error, and we were lucky to find out that James had a buggytest.py
file in the directory where we were executing his script. For some reason, cdms2 or something imports test.py, except that it was not getting it from the right place, or something like thatExample below
The text was updated successfully, but these errors were encountered: