2013-08-12 5 views
5

python JIRAClient.py으로 프로그램을 실행하면 모든 것이 정상적으로 작동합니다. 내가 #!/usr/bin/env python를 추가하고 실행 권한을 부여하여 프로그램 실행을 한 후에 내가 ./JIRAClient.pypython : 프로그램 실행 후 가져 오기 오류

from: can't read /var/mail/jira.client 
Version: ImageMagick 6.8.6-3 2013-07-06 Q16 http://www.imagemagick.org 
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC 
Features: DPC Modules 
Delegates: bzlib freetype jng jpeg png xml zlib 

Usage: import [options ...] [ file ] 
Image Settings: 
...... 
Image Operators: 
...... 
Miscellaneous Options: 
...... 
By default, 'file' is written in the MIFF image format. To 
specify a particular image format, precede the filename with an image 
format name and a colon (i.e. ps:image) or specify the image type as 
the filename suffix (i.e. image.ps). Specify 'file' as '-' for 
standard input or output. 
import: delegate library support not built-in `' (X11) @ error/import.c/ImportImageCommand/1298. 
./JIRAClient.py: line 4: config_ini: command not found 
./JIRAClient.py: line 5: syntax error near unexpected token `(' 
./JIRAClient.py: line 5: `config = ConfigParser.ConfigParser()' 

등의 프로그램이 오류가 무엇을 의미 하는가를 실행하려고하면, 나는 몇 가지 오류가? 그리고이 두 가지 프로그램 실행 방법의 차이점은 무엇입니까?

from jira.client import JIRA 
import ConfigParser 

config_ini = 'config.ini' 
config = ConfigParser.ConfigParser() 
dataset = config.read(config_ini) 

답변

8

프로그램이 떠들썩한 파티 스크립트처럼 실행하는 데 노력하고있다, 그래서 당신의 #!/usr/bin/env python는 영향을 미치지 않았다 보인다 : 오류가 발생 코드의

선은 다음과 같습니다. 이 줄이 첫 줄의 프로그램 상단에 있는지 확인하십시오. 문자가없는 경우 #

+0

예, 맞습니다. 실수로'# '앞에 공백을 추가합니다. 이제 작동합니다. – Cacheing