sh: test: argument expected
Iván Cabria
cabria at fta.uva.es
Tue Nov 2 19:43:16 EST 2004
Hi,
I am a new user of python. I ran
a python script and I got the
following message:
sh: test: argument expected
I found that this error came from a
line in the script:
energy = atoms.GetPotentialEnergy()
I looked for a solution to this
problem in Internet and I found
(http://www.experts-exchange.com/Operating_Systems/Unix/Q_20706303.html)
that the problem was that the variable
was not initialised. I also found
that the bash shell initialises the variables
automatically and the Bourne shell (sh) does not.
(http://www.experts-exchange.com/Operating_Systems/Unix/Q_20706303.html)
I suppose that 'sh:' in the error message
means that the script is using the Bourne shell,
and hence, I understand the message error.
However, I was using the bash shell in the computer
I ran the script, not
the Bourne shell (sh). Hence, I do not
understand the 'sh:' in the error message.
Could be that python scripts are using by default the
Bourne shell?
The first line of the python script is:
#!/usr/bin/env python
Thanks in advance.
More information about the Python-list
mailing list