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 此號已被刪 閱讀(740) 評論(0)  編輯  收藏 所屬分類: ReviewBoard

          導航

          統計

          常用鏈接

          留言簿(8)

          隨筆分類(83)

          隨筆檔案(78)

          文章檔案(2)

          相冊

          收藏夾(7)

          最新隨筆

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 永泰县| 治县。| 涟源市| 双辽市| 惠东县| 晋宁县| 师宗县| 海城市| 原阳县| 合川市| 沙洋县| 商丘市| 瓦房店市| 汶上县| 邳州市| 太谷县| 环江| 元阳县| 治县。| 门源| 仪陇县| 乌拉特中旗| 观塘区| 阳朔县| 江华| 太康县| 新竹县| 合山市| 苏尼特左旗| 固始县| 桃园市| 桃园县| 桦川县| 孝感市| 灵川县| 大足县| 肥西县| 南乐县| 绩溪县| 南投县| 民乐县|