On Fri, Feb 10, 2012 at 3:34 PM, Brad Aagaard <span dir="ltr">&lt;<a href="mailto:baagaard@usgs.gov">baagaard@usgs.gov</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 02/10/2012 01:15 PM, Mahesh S Dhar wrote:<br>
&gt; Hi,<br>
&gt; I installed Pylith software  (using the link; pylith-1.6.2-darwin-10.6.8.tgz) and ran set up file by source setup.sh. From tutorial file I tried to run .cfg file ( e.g.  pylith axialdisp.cfg). the error message comes as below;<br>

</div>&gt; ceriml09:pylith-1.6.2-darwin-10.6.8 msdhar$ source setup.sh Ready to run PyLith.ceriml09:pylith-1.6.2-darwin-10.6.8 msdhar$ cd ssetup.sh  share/    src/      ceriml09:pylith-1.6.2-darwin-10.6.8 msdhar$ cd src/pylith/examples/twocells/twot twotet4/         twotet4-geoproj/ twotri3/         ceriml09:pylith-1.6.2-darwin-10.6.8 msdhar$ cd src/pylith/examples/twocells/twotri3/ceriml09:twotri3 msdhar$ pylith axialdisp.cfg &#39;import site&#39; failed; use -v for tracebackTraceback (most recent call last):  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/bin/pylith&quot;, line 28, in&lt;module&gt;     import os.path, sys, site  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site-packages/site.py&quot;, line 73, in&lt;module&gt;     __boot()  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site-packages/site.py&quot;, line 33, in __boot    imp.load_module(&#39;site&#39;,stream,path,descr)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.<br>

py&quot;, line 525, in&lt;module&gt;     main()  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 508, in main    known_paths = addsitepackages(known_paths)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 288, in addsitepackages    addsitedir(sitedir, known_paths)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 185, in addsitedir    addpackage(sitedir, name, known_paths)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 159, in addpackage    if not dircase in known_paths and os.path.exists(dir):  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/genericpath.py&quot;, line 18, in exists    st = os.stat(path)TypeError: stat() argument 1 must be encoded string without NULL bytes, not strceriml09:twotri3 msdhar$ pysetReady to run PyLith.ceriml09:pylith-1.6.2-darwin-10.6.8 msdhar$ pylith axialdisp.cfg&#39;import site&#39; failed;<br>

 use -v for tracebackTraceback (most recent call last):  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/bin/pylith&quot;, line 28, in&lt;module&gt;     import os.path, sys, site  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site-packages/site.py&quot;, line 73, in&lt;module&gt;     __boot()  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site-packages/site.py&quot;, line 33, in __boot    imp.load_module(&#39;site&#39;,stream,path,descr)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 525, in&lt;module&gt;     main()  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 508, in main    known_paths = addsitepackages(known_paths)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 288, in addsitepackages    addsitedir(sitedir, known_paths)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 185, in addsitedir    a<br>

ddpackage(sitedir, name, known_paths)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 159, in addpackage    if not dircase in known_paths and os.path.exists(dir):  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/genericpath.py&quot;, line 18, in exists    st = os.stat(path)TypeError: stat() argument 1 must be encoded string without NULL bytes, not strceriml09:pylith-1.6.2-darwin-10.6.8 msdhar$ cd src/pylith/examples/twocells/twotri3/ceriml09:twotri3 msdhar$ pylith axialdisp.cfg&#39;import site&#39; failed; use -v for tracebackTraceback (most recent call last):  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/bin/pylith&quot;, line 28, in&lt;module&gt;     import os.path, sys, site  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site-packages/site.py&quot;, line 73, in&lt;module&gt;     __boot()  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site-packages/site.py&quot;, line 33, in __boot    i<br>

mp.load_module(&#39;site&#39;,stream,path,descr)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 525, in&lt;module&gt;     main()  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 508, in main    known_paths = addsitepackages(known_paths)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 288, in addsitepackages    addsitedir(sitedir, known_paths)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 185, in addsitedir    addpackage(sitedir, name, known_paths)  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/site.py&quot;, line 159, in addpackage    if not dircase in known_paths and os.path.exists(dir):  File &quot;/gaia/home/msdhar/pylith/pylith-1.6.2-darwin-10.6.8/lib/python2.6/genericpath.py&quot;, line 18, in exists    st = os.stat(path)TypeError: stat() argument 1 must be encoded string without NULL bytes, not strceriml09:twotri3<br>

<div class="im"> msdhar$<br>
&gt; How do I fix this? I am using MAC OS X Version 10.6.8.<br>
&gt;   sincerely,mahesh<br>
<br>
</div>The error you are getting is likely caused by conflicts in your<br>
environment setup. First, make sure you are using the bash shell.<br></blockquote><div><br></div><div>Note that this is a sure sign:</div><div><br></div><div><div style>ceriml09:pylith-1.6.2-darwin-10.6.8 msdhar$ cd src/pylith/examples/twocells/twotri3/</div>
<div style><u><font color="#ff0000">ceriml09:twotri3 msdhar$ pylith axialdisp.cfg </font></u></div><div style>&#39;import site&#39; failed; use -v for traceback</div><div style>Traceback (most recent call last):</div></div>
<div><br></div><div>The &#39;import site&#39; is the setup code for Python. If this fails, you have something wrong with the Python</div><div>environment before PyLith is run. Brad is likely right that it is your environment.</div>
<div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
echo $SHELL<br>
<br>
The output should be &quot;/bin/bash&quot;. If the output is not /bin/bash, then<br>
simply startup a bash shell before running &quot;source setup.sh&quot; by typing<br>
&quot;bash&quot;. If you are using the bash shell, then please try the following<br>
from the top-level pylith directory (where setup.sh) is:<br>
<br>
unset PYTHONPATH<br>
unset DYLD_LIBRARY_PATH<br>
PATH=/bin:/usr/bin<br>
source setup.sh<br>
cd src/pylith/examples/twocells/twotri3<br>
pylith axialdisp.cfg<br>
<br>
Regards,<br>
Brad<br>
_______________________________________________<br>
CIG-SHORT mailing list<br>
<a href="mailto:CIG-SHORT@geodynamics.org">CIG-SHORT@geodynamics.org</a><br>
<a href="http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short" target="_blank">http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>