kushal waikar
2009-Feb-18 15:32 UTC
[Xen-devel] ERROR: AttributeError: ''module'' object has no attribute ''new''
Hi,
I have "Xen 3.1.13.fc8" installed on FC8 as Dom0..I have written
the following code in python which is throwing error...I am not getting the
cause of error...Plz help me for removing error...
CODE :
INPUT test2.py
"
import sys
import curses
import curses.ascii
import time
sys.path.append(''/usr/lib/python'')
import xen.lowlevel.xc
xc = xen.lowlevel.xc.new()
"
OUTPUT-->
[root@localhost ~]# python test2.py
Traceback (most recent call last):
File "test2.py", line 9, in <module>
xc = xen.lowlevel.xc.new()
AttributeError: ''module'' object has no attribute
''new''
Thanks,
Kushal Waikar
kushalwaikar@yahoo.co.in
Add more friends to your messenger and enjoy! Go to
http://messenger.yahoo.com/invite/
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Peter Teoh
2009-Feb-19 15:09 UTC
Re: [Xen-devel] ERROR: AttributeError: ''module'' object has no attribute ''new''
i did not start my xend or hypervisor yet, but just doing a test:
python -d /usr/sbin/xm
ERROR Internal error: Could not obtain handle on privileged command
interface (2 = No such file or directory)
Traceback (most recent call last):
File "/usr/sbin/xm", line 8, in <module>
from xen.xm import main
File "/usr/lib64/python2.5/site-packages/xen/xm/main.py", line 61,
in <module>
xc = xen.lowlevel.xc.xc()
xen.lowlevel.xc.Error: (1, ''Internal error'', ''Could
not obtain handle
on privileged command interface (2 = No such file or directory)'')
and immediately u can see which python script it is loading from.
Your problem is mostly that the path is not properly defined/included.
Looking at the "includes" in /usr/sbin/xm,
/usr/lib64/python2.5/site-packages/xen/xm/main.py etc...u can
approximately guess that most of the python scripts are located in
/usr/lib64/python2.5/site-packages/xen/ directory. But then again
yours may differ.
On Wed, Feb 18, 2009 at 10:32 AM, kushal waikar
<kushalwaikar@yahoo.co.in> wrote:> Hi,
>
> I have "Xen 3.1.13.fc8" installed on FC8 as Dom0..I have
written the
> following code in python which is throwing error...I am not getting the
> cause of error...Plz help me for removing error...
>
> CODE :
>
> INPUT test2.py
> "
> import sys
> import curses
> import curses.ascii
> import time
>
> sys.path.append(''/usr/lib/python'')
> import xen.lowlevel.xc
>
> xc = xen.lowlevel.xc.new()
> "
>
> OUTPUT-->
>
> [root@localhost ~]# python test2.py
> Traceback (most recent call last):
> File "test2.py", line 9, in <module>
> xc = xen.lowlevel.xc.new()
> AttributeError: ''module'' object has no attribute
''new''
>
>
>
> Thanks,
> Kushal Waikar
> kushalwaikar@yahoo.co.in
>
>
> ________________________________
> Add more friends to your messenger and enjoy! Invite them now.
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
--
Regards,
Peter Teoh
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel