Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ECA0F17F70 for ; Wed, 25 Mar 2015 13:53:05 +0000 (UTC) Received: (qmail 95875 invoked by uid 500); 25 Mar 2015 13:53:05 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 95815 invoked by uid 500); 25 Mar 2015 13:53:05 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 95802 invoked by uid 99); 25 Mar 2015 13:53:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Mar 2015 13:53:05 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of costerwi@gmail.com designates 209.85.213.44 as permitted sender) Received: from [209.85.213.44] (HELO mail-yh0-f44.google.com) (209.85.213.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Mar 2015 13:52:40 +0000 Received: by yhim52 with SMTP id m52so11665058yhi.2 for ; Wed, 25 Mar 2015 06:51:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=xEpp7REBW8v1B6lYzvak3z9dOXRjWqIo9U57QAZnKLA=; b=Ko8s9iumJ0siwSk52jW6PllrnVGNli/uHf9qfKTidqGKnoDQibyxcY3CFr7ACx6mNj ckYI2HZK6IkT/1t8PLz/0OhI1LNpNI+uTmC8cUu92QQ0qrIwpIfu2+IA6lVMIlS+ZNq0 nbxzMFRImM3THoIXQgpJm8qLK2St8952SsAscXKFiCR7ooLE9nNONVoFkAtoWcL9cXQ5 uiUZ7UeUyG2BggATpUC4+7Ek7eijxh1/z/J3LP/jxuuMwcU1BcpWACRWQNos+n75nds4 GufeHN/phOkLgwsE2Bg+gA/zasJd5vxM32tqEZnGj17mmibl//s115xZ0aiSvoxetQpP WkDw== MIME-Version: 1.0 X-Received: by 10.170.119.213 with SMTP id l204mr11641257ykb.1.1427291513746; Wed, 25 Mar 2015 06:51:53 -0700 (PDT) Received: by 10.170.181.73 with HTTP; Wed, 25 Mar 2015 06:51:53 -0700 (PDT) Date: Wed, 25 Mar 2015 09:51:53 -0400 Message-ID: Subject: Python CMISlib 0.5.1 with large documents From: Carl Osterwisch To: dev@chemistry.apache.org Content-Type: multipart/alternative; boundary=001a1139044cab174c05121d3393 X-Virus-Checked: Checked by ClamAV on apache.org --001a1139044cab174c05121d3393 Content-Type: text/plain; charset=UTF-8 I'm getting a memory error when I call Folder.createDocument(), passing a contentFile of 120MB. Smaller files are uploading without trouble. Are there any tricks to stream the document so it doesn't need to consume as much memory? Does the unreleased CMISlib 0.6 address this issue? Thanks for any suggestions! -Carl File "C:\Anaconda\lib\site-packages\cmislib-0.5.1-py2.7.egg\cmislib\model.py", line 2756, in createDocument contentEncoding) File "C:\Anaconda\lib\site-packages\cmislib-0.5.1-py2.7.egg\cmislib\model.py", line 1185, in createDocument result = self._cmisClient.post(postUrl.encode('utf-8'), xmlDoc.toxml(encodin g='utf-8'), ATOM_XML_ENTRY_TYPE) File "C:\Anaconda\lib\xml\dom\minidom.py", line 46, in toxml return self.toprettyxml("", "", encoding) File "C:\Anaconda\lib\xml\dom\minidom.py", line 58, in toprettyxml self.writexml(writer, "", indent, newl, encoding) File "C:\Anaconda\lib\xml\dom\minidom.py", line 1749, in writexml node.writexml(writer, indent, addindent, newl) File "C:\Anaconda\lib\xml\dom\minidom.py", line 814, in writexml node.writexml(writer, indent+addindent, addindent, newl) File "C:\Anaconda\lib\xml\dom\minidom.py", line 814, in writexml node.writexml(writer, indent+addindent, addindent, newl) File "C:\Anaconda\lib\xml\dom\minidom.py", line 810, in writexml self.childNodes[0].writexml(writer, '', '', '') File "C:\Anaconda\lib\xml\dom\minidom.py", line 1038, in writexml _write_data(writer, "%s%s%s" % (indent, self.data, newl)) File "C:\Anaconda\lib\xml\dom\minidom.py", line 298, in _write_data writer.write(data) File "C:\Anaconda\lib\codecs.py", line 351, in write data, consumed = self.encode(object, self.errors) MemoryError --001a1139044cab174c05121d3393--