Discussion:
Zencommand: ImportError: No module named site
Marios Zindilis
2012-08-24 14:17:33 UTC
Permalink
Marios Zindilis [http://community.zenoss.org/people/Marios-Zindilis] created the discussion

"Zencommand: ImportError: No module named site"

To view the discussion, visit: http://community.zenoss.org/message/68120#68120

--------------------------------------------------------------
I wrote a zencommand in Python, that pulls the content of a webpage and searches for some strings in it. I get the expected result if I run the command with:

[***@zenoss libexec]$ python check_xml.py

I also get the expected result if I execute it as root:

[***@zenoss scripts]# ./check_xml.py

If I add the zencommand to a device in Zenoss, I get:

Cmd: $ZENHOME/libexec/check_xml.py - Code: 1 - Msg: General error

If execute the script as zenoss user I get:

[***@zenoss libexec]$ ./check_xml.py
ImportError: No module named site

I searched Google, and Zenoss forums, could not find an answer. Any idea why this happens?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/68120#68120]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...