プログラムを として実行すると python JIRAClient.py
、すべて正常に動作します。しかし、プログラム#!/usr/bin/env python
に実行権限を追加して与えることでプログラムを実行可能にした後、プログラムを次のように実行しようとするとエラーが発生します./JIRAClient.py
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()'
このエラーはどういう意味ですか? プログラムを実行するこれら 2 つの方法の違いは何ですか?
エラーを生成するコード行は次のとおりです。
from jira.client import JIRA
import ConfigParser
config_ini = 'config.ini'
config = ConfigParser.ConfigParser()
dataset = config.read(config_ini)