[vdsm] error when run vdsClient

ShaoHe Feng shaohef at linux.vnet.ibm.com
Wed May 9 08:02:32 UTC 2012


On 05/09/2012 05:46 AM, Adam Litke wrote:
> On Tue, May 08, 2012 at 11:51:02PM +0300, Dan Kenigsberg wrote:
>> On Wed, May 09, 2012 at 01:42:45AM +0800, ShaoHe Feng wrote:
>>> $ sudo ./autobuild.sh
>>> build vdsm, and all test OK.
>>>
>>> then rpm install the rpm package.
>>>
>>> and start the vdsm
>>> $ sudo systemctl start vdsmd.service
>>>
>>> but error, when run vdsClient.
>>>
>>>    File "/usr/share/vdsm/vdsClient.py", line 28, in<module>
>>>      from vdsm import vdscli
>>> ImportError: cannot import name vdscli
>>>
>>> but I change to root, the vdsClient can work.
> I have also noticed this problem.  I have found that changing out of the vdsm
> source directory 'fixes' it as well.
>
>>> $ ls /usr/lib/python2.7/site-packages/vdsm/vdscli.py -al
>>> -rw-r--r--. 1 root root 4113 May  9 01:20
>>> /usr/lib/python2.7/site-packages/vdsm/vdscli.py
>> What's your $PWD? Maybe you have some vdsm module/package in your
>> PYTHONPATH that hides the one in site-packages.
Yes.
It is in building path.
so I change the work path, it can work.

I add the following  two codes in vdsClient.py, it can also work.
sys.path.remove(os.path.abspath('.'))
sys.path.remove('')

but I just remove the current path, it can not work.
>> _______________________________________________
>> vdsm-devel mailing list
>> vdsm-devel at lists.fedorahosted.org
>> https://fedorahosted.org/mailman/listinfo/vdsm-devel



More information about the vdsm-devel mailing list