Skip to contentSkip to conversation

ERROR: AttributeError: 'module' object has no attribute 'new'

DISCUSSION kushal waikar 2 participants 2 messages Feb 18, 2009 – Feb 19, 2009

lore
Share & tools
lore
#0 lore raw

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
[email protected]

Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

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.

Quoted 44 lines · kushal waikar

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
[email protected]

________________________________
Add more friends to your messenger and enjoy! Invite them now.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 2 lines
Regards,
Peter Teoh