WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] ERROR: AttributeError: 'module' object has no attribute

To: kushalwaikar@xxxxxxxxxxx
Subject: Re: [Xen-devel] ERROR: AttributeError: 'module' object has no attribute 'new'
From: Peter Teoh <htmldeveloper@xxxxxxxxx>
Date: Thu, 19 Feb 2009 10:09:25 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 19 Feb 2009 07:09:53 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=M5qWautCurMSzXvFx+Uxbkrl65pn6LwF1CmIfJvigb4=; b=x7jFbsyS+olz7uLPcV2K50XD8gHpZl5KH3jW2gNpZbGDcWn8rjJQcl8A+EGz5++1BF WoMd7PO2ybq/Ps/ZUBmVtbE6pSZrBun0p8XWoalIUtFsMJZvFaDb61IQANF64YqQqecd yvpH5R0Sni1NptQmRarvbWH74I5b2+QHgkcTM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=gVX1AKgqvnkcFBj8QNX4h9A/vSRhEaco2Lu/LJfeWJdnyOqciA8cu4Qyoy+KA7/D8f v5F1gowpTdMDmzSyddBsrCilshqy655sTGMzL1Tm8c74vb/XzGCozRP+K5uA9dAiNBFY Xm5y21Z+uDMhDk9koUWEFFQbTONn3y8SnTw3Y=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <724512.2577.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <724512.2577.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxx> 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@xxxxxxxxxxx
>
>
> ________________________________
> Add more friends to your messenger and enjoy! Invite them now.
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
>



-- 
Regards,
Peter Teoh

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>