2012-02-17 7 views
0

psphere를 사용하여 보겠습니다. 나는 성공적으로 핍을 통해 설치하지만 난합니다 (psphere 문서 사이트에서 가져온) 다음 코드 실행 문제로 실행했습니다파이썬 Psphere 문제

"could not found expected ':'", self.get_mark()) yaml.scanner.ScannerError: while scanning a simple key in "C:\Users\thor/.psphere/config.yaml", line 5, column 1

다음 내가 얻을 해당 명령을 실행 한 후

from psphere.client import Client 
from psphere.managedobjects import HostSystem 


Client = Client("server", "username", "password") 

hs_list = HostSystem.all(Client) 
len(hs_list) 

could not found expected ':' in "C:\Users\thor/.psphere/config.yaml", line 6, column 1

  1. 는 더 .psphere 디렉토리 나 config.yaml 없었다. 내가 솔직히 말해서는 안되지만 두 가지 모두를 만들었지 만 yaml 파일에 무엇이 있어야하는지 모릅니다.
  2. 내 파일에는 없습니다 : 예외가 발생하는 이유를 모르겠습니다.

도움을 받으실 수 있습니다. 감사.

답변

1

배포판의 examples/디렉토리에는 사용할 수있는 sample_config.yaml 파일이 있습니다.

+0

고맙습니다! – Paul