Natural

           

          ReviewBoard上傳圖片異常

          創建review request,除了查看代碼diff進行評論這個主要功能外,還可以添加日志、圖片等文件,并對這些附件評論。

          測試時發現添加普通日志之類文件正常,但添加圖片時出現錯誤。提示你可能是個bug或服務器配置問題。

          查看日志顯示的是“The _imaging C module is not installed”。

          google了一下,得知是默認的PIL模塊對Image在windows下的支持有問題。

          在網上找到了另一個可用的版本:PIL-1.1.7,針對不同python平臺提供了32/64位的版本。
          http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy



          Internal Server Error: /reviews/api/review-requests/37/file-attachments/
          Traceback (most recent call last):
            File "F:\CodeReview\Python27\lib\site-packages\django-1.4.3-py2.7.egg\django\core\handlers\base.py", line 188, in get_response
              response = middleware_method(request, response)
            File "F:\CodeReview\Python27\lib\site-packages\django-1.4.3-py2.7.egg\django\middleware\http.py", line 14, in process_response
              response['Content-Length'] = str(len(response.content))
            File "F:\CodeReview\Python27\lib\site-packages\djblets-0.7.8-py2.7.egg\djblets\webapi\core.py", line 281, in _get_content
              content = adapter.encode(self.api_data, request=self.request)
            File "F:\CodeReview\Python27\lib\site-packages\djblets-0.7.8-py2.7.egg\djblets\webapi\core.py", line 88, in encode
              return super(JSONEncoderAdapter, self).encode(o)
            File "F:\CodeReview\Python27\lib\json\encoder.py", line 201, in encode
              chunks = self.iterencode(o, _one_shot=True)
            File "F:\CodeReview\Python27\lib\json\encoder.py", line 264, in iterencode
              return _iterencode(o, 0)
            File "F:\CodeReview\Python27\lib\site-packages\djblets-0.7.8-py2.7.egg\djblets\webapi\core.py", line 96, in default
              result = self.encoder.encode(o, *self.encode_args, **self.encode_kwargs)
            File "F:\CodeReview\Python27\lib\site-packages\djblets-0.7.8-py2.7.egg\djblets\webapi\core.py", line 261, in encode
              result = encoder.encode(*args, **kwargs)
            File "F:\CodeReview\Python27\lib\site-packages\djblets-0.7.8-py2.7.egg\djblets\webapi\encoders.py", line 48, in encode
              return resource.serialize_object(o, *args, **kwargs)
            File "F:\CodeReview\Python27\lib\site-packages\djblets-0.7.8-py2.7.egg\djblets\webapi\resources.py", line 906, in serialize_object
              value = getattr(obj, field)
            File "F:\CodeReview\Python27\lib\site-packages\reviewboard-1.7.2-py2.7.egg\reviewboard\attachments\models.py", line 39, in thumbnail
              return self.mimetype_handler.get_thumbnail()
            File "F:\CodeReview\Python27\lib\site-packages\reviewboard-1.7.2-py2.7.egg\reviewboard\attachments\mimetypes.py", line 195, in get_thumbnail
              % (thumbnail(self.attachment.file),
            File "F:\CodeReview\Python27\lib\site-packages\djblets-0.7.8-py2.7.egg\djblets\util\templatetags\djblets_images.py", line 118, in thumbnail
              image.thumbnail([x, y], Image.ANTIALIAS)
            File "F:\CodeReview\Python27\lib\site-packages\PIL\Image.py", line 1559, in thumbnail
              self.load()
            File "F:\CodeReview\Python27\lib\site-packages\PIL\ImageFile.py", line 164, in load
              self.load_prepare()
            File "F:\CodeReview\Python27\lib\site-packages\PIL\ImageFile.py", line 231, in load_prepare
              self.im = Image.core.new(self.mode, self.size)
            File "F:\CodeReview\Python27\lib\site-packages\PIL\Image.py", line 37, in __getattr__
              raise ImportError("The _imaging C module is not installed")
          ImportError: The _imaging C module is not installed

          posted on 2013-02-26 16:27 此號已被刪 閱讀(750) 評論(0)  編輯  收藏 所屬分類: ReviewBoard

          導航

          統計

          常用鏈接

          留言簿(8)

          隨筆分類(83)

          隨筆檔案(78)

          文章檔案(2)

          相冊

          收藏夾(7)

          最新隨筆

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 临清市| 隆安县| 通州区| 兴化市| 海原县| 泰州市| 汽车| 朝阳县| 广昌县| 怀化市| 博湖县| 岳阳市| 保靖县| 汶川县| 凤翔县| 澄迈县| 宁明县| 聊城市| 阿城市| 周口市| 同仁县| 湄潭县| 当涂县| 伊宁市| 上栗县| 太谷县| 南宁市| 房产| 九江县| 宕昌县| 龙海市| 开远市| 黄浦区| 徐闻县| 宜川县| 晋中市| 东乌珠穆沁旗| 英德市| 雅江县| 白朗县| 台中县|