Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(8)  |  Derive(0)  |  Import(4)
Invalid config options either from the ini file or the CLI
    

src/p/y/py2FaceR-0.1.1/src/py2facer/lib/image.py   py2FaceR(Download)
 
from PIL import IptcImagePlugin, ExifTags
from py2facer.lib.utils import InvalidConfig, InvalidState
import datetime
import logging
 
        if not os.path.exists(image_path):
            raise InvalidConfig('%s does not exist!' % image_path)
        self._image_path = os.path.abspath(image_path)
        self._people = []
            if not (x_pos is not None and y_pos is not None and
                    width is not None and height is not None):
                raise InvalidConfig('If any keyword arg is not None, then ALL must not be none')
            if x_pos > self.width or (x_pos + width) > self.width:
                raise InvalidState('Face (%s) in image %s X boundry or boundry+'

src/p/y/py2FaceR-0.1.1/src/py2facer/lib/picasa.py   py2FaceR(Download)
import logging
from ConfigParser import SafeConfigParser
from py2facer.lib.utils import InvalidConfig, ParseError
 
LOGGER = logging.getLogger('lib.picasa')
            self.emails = list(emails)
        else:
            raise InvalidConfig('emails must be str, unicode, or iterable')
        self.google_hash = google_hash
 
        num = re.match('rect64\(([^)]+)\)', pos)
        if num is None:
            raise InvalidConfig('Unable to parse .picasa.ini pos %s' % pos)
        positions = int(num.group(1), 16)
        lft = ((positions & 0xffff000000000000) >> 48) / 65535.0

src/p/y/py2FaceR-0.1.1/src/py2facer/commands/base.py   py2FaceR(Download)
from py2facer.lib.flickr import FlickrImageManager, FlickrContactManager, \
    FlickrAPIManager, DbProxy
from py2facer.lib.utils import InvalidConfig
import ConfigParser
import argparse
                if optname not in api_config:
                    if 'required' in option['kwargs'] and option['kwargs']['required']:
                        raise InvalidConfig('%s is required via API config' % optname)
                    continue
                self.cmd_config[optname] = api_config[optname]
    def check_config(self):
        if self.cmd_config['db_url'] is None:
            raise InvalidConfig('db_url must be defined to use %s' % self.COMMAND)
 
    def do_command(self):
        result = find(paths)
        if result is None:
            raise InvalidConfig('Unable to find a contacts.xml file to use')
        return result
 
    def check_config(self):
        if self.cmd_config['db_url'] is None:
            raise InvalidConfig('db_url must be defined to use %s' % self.COMMAND)
 
    def do_command(self):

src/p/y/py2FaceR-0.1.1/src/py2facer/lib/flickr.py   py2FaceR(Download)
# pylint: disable=W0232
 
from py2facer.lib.utils import InvalidConfig, InvalidState
import flickrapi
from sqlalchemy.ext.declarative import declarative_base