Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/345.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 安装或安装不工作_Python_Ubuntu 12.04_Thumbnails_Thumbor - Fatal编程技术网

Python 安装或安装不工作

Python 安装或安装不工作,python,ubuntu-12.04,thumbnails,thumbor,Python,Ubuntu 12.04,Thumbnails,Thumbor,我已经按照维基设置了所有必要的内容,但是所有的图片现在都被破坏了。我使用aptitude软件包管理器进行安装 以下是我的配置文件: /etc/default/thumbor # set this to 0 to disable thumbor, remove or set anything else to enable it # you can temporarily override this with # sudo service thumbor start force=1 enabled=

我已经按照维基设置了所有必要的内容,但是所有的图片现在都被破坏了。我使用
aptitude
软件包管理器进行安装

以下是我的配置文件:

/etc/default/thumbor

# set this to 0 to disable thumbor, remove or set anything else to enable it # you can temporarily override this with # sudo service thumbor start force=1 enabled=1 # Location of the configuration file conffile=/etc/thumbor.conf # Location of the keyfile which contains the signing secret used in URLs #keyfile=/etc/thumbor.key # IP address to bind to. Defaults to all IP addresses # ip=127.0.0.1 # TCP port to bind to. Defaults to port 8888. # multiple instances of thumbor can be started by putting several ports coma separeted # Ex: # port=8888,8889,8890 # or port=8888 #Default #!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/globocom/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com # the domains that can have their images resized # use an empty list for allow all sources #ALLOWED_SOURCES = ['mydomain.com'] ALLOWED_SOURCES = ['admin.mj.dev', 'mj.dev', 'api.mj.dev', 's3.amazonaws.com'] # the max width of the resized image # use 0 for no max width # if the original image is larger than MAX_WIDTH x MAX_HEIGHT, # it is proportionally resized to MAX_WIDTH x MAX_HEIGHT # MAX_WIDTH = 800 # the max height of the resized image # use 0 for no max height # if the original image is larger than MAX_WIDTH x MAX_HEIGHT, # it is proportionally resized to MAX_WIDTH x MAX_HEIGHT # MAX_HEIGHT = 600 # the quality of the generated image # this option can vary widely between # imaging engines and works only on jpeg images QUALITY = 85 # enable this options to specify client-side cache in seconds MAX_AGE = 24 * 60 * 60 # client-side caching time for temporary images (using queued detectors or after detection errors) MAX_AGE_TEMP_IMAGE = 0 # the way images are to be loaded LOADER = 'thumbor.loaders.http_loader' # maximum size of the source image in Kbytes. # use 0 for no limit. # this is a very important measure to disencourage very # large source images. # THIS ONLY WORKS WITH http_loader. MAX_SOURCE_SIZE = 0 # if you set UPLOAD_ENABLED to True, # a route /upload will be enabled for your thumbor process # You can then do a put to this URL to store the photo # using the specified Storage UPLOAD_ENABLED = False UPLOAD_PHOTO_STORAGE = 'thumbor.storages.file_storage' UPLOAD_PUT_ALLOWED = False UPLOAD_DELETE_ALLOWED = False # how to store the loaded images so we don't have to load # them again with the loader #STORAGE = 'thumbor.storages.redis_storage' #STORAGE = 'thumbor.storages.no_storage' STORAGE = 'thumbor.storages.file_storage' #STORAGE = 'thumbor.storages.mixed_storage' # root path of the file storage FILE_STORAGE_ROOT_PATH = '/var/lib/thumbor/storage' # If you want to cache results, use this options to specify how to cache it # Set Expiration seconds to ZERO if you want them not to expire. #RESULT_STORAGE = 'thumbor.result_storages.file_storage' #RESULT_STORAGE_EXPIRATION_SECONDS = 60 * 60 * 24 # one day #RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = '/tmp/thumbor/result_storage' RESULT_STORAGE_STORES_UNSAFE=False # stores the crypto key in each image in the storage # this is VERY useful to allow changing the security key STORES_CRYPTO_KEY_FOR_EACH_IMAGE = True #REDIS_STORAGE_SERVER_HOST = 'localhost' #REDIS_STORAGE_SERVER_PORT = 6379 #REDIS_STORAGE_SERVER_DB = 0 #REDIS_STORAGE_SERVER_PASSWORD = None # imaging engine to use to process images #ENGINE = 'thumbor.engines.graphicsmagick' #ENGINE = 'thumbor.engines.pil' ENGINE = 'thumbor.engines.opencv' # detectors to use to find Focal Points in the image # more about detectors can be found in thumbor's docs # at https://github.com/globocom/thumbor/wiki DETECTORS = [ 'thumbor.detectors.face_detector', 'thumbor.detectors.feature_detector', ] # Redis parameters for queued detectors # REDIS_QUEUE_SERVER_HOST = 'localhost' # REDIS_QUEUE_SERVER_PORT = 6379 # REDIS_QUEUE_SERVER_DB = 0 # REDIS_QUEUE_SERVER_PASSWORD = None # if you use face detection this is the file that # OpenCV will use to find faces. The default should be # fine, so change this at your own peril. # if you set a relative path it will be relative to # the thumbor/detectors/face_detector folder #FACE_DETECTOR_CASCADE_FILE = 'haarcascade_frontalface_alt.xml' # this is the security key used to encrypt/decrypt urls. # make sure this is unique and not well-known # This can be any string of up to 16 characters SECURITY_KEY = "thumbor@musejam@)!$" # if you enable this, the unencryted URL will be available # to users. # IT IS VERY ADVISED TO SET THIS TO False TO STOP OVERLOADING # OF THE SERVER FROM MALICIOUS USERS ALLOW_UNSAFE_URL = False # Mixed storage classes. Change them to the fullname of the # storage you desire for each operation. #MIXED_STORAGE_FILE_STORAGE = 'thumbor.storages.file_storage' #MIXED_STORAGE_CRYPTO_STORAGE = 'thumbor.storages.no_storage' #MIXED_STORAGE_DETECTOR_STORAGE = 'thumbor.storages.no_storage' FILTERS = [ 'thumbor.filters.brightness', 'thumbor.filters.contrast', 'thumbor.filters.rgb', 'thumbor.filters.round_corner', 'thumbor.filters.quality', 'thumbor.filters.noise', 'thumbor.filters.watermark', 'thumbor.filters.equalize', 'thumbor.filters.fill', 'thumbor.filters.sharpen', 'thumbor.filters.strip_icc', 'thumbor.filters.frame', # can only be applied if there are already points for the image being served # this means that either you are using the local face detector or the image # has already went through remote detection # 'thumbor.filters.redeye', 我尝试加载的图像的URL如下所示:

http://localhost:8888/Q9boJke8j2p2Qtv53Hbz_g1nMZo=/250x250/smart/http://s3.amazonaws.com/our-公司/0ea7eeb2979215f35112d2e5753a1ee5.jpg


我还在
/etc/thumbor.key
中设置了一个键,请告诉我是否有必要在此处发布。

您的thumbor.conf中的过滤器选项缺少一个右括号

您是否错过了在这里发布的内容,或者实际上是在thumbor.conf文件中