odfWeave is throwing up a cryptic error, after successfully processing a file with a large number of figures (~30) and many \Sexpr{} calls. The error is (at least to me) cryptic. I am not sure where to look to correct this problem. Here's the error: Post-processing the contents Error in .Call("RS_XML_Parse", file, handlers, endElementHandlers, as.logical(addContext), : attempt to apply non-function Is there any way to figure out what this means, or where I might look for the error in the source? Here's a capture of the associated log. I am running R 2.8 under Ubuntu 8.04. Thanks, > odfWeave("/home/rob/Trauma/Report_2_draft.odt", "/home/rob/Trauma/Report_2_draft_out.odt") Copying /home/rob/Trauma/Report_2_draft.odt Setting wd to /tmp/Rtmp2tlRz0/odfWeave23115040235 Unzipping ODF file using unzip -o Report_2_draft.odt Archive: Report_2_draft.odt extracting: mimetype creating: Configurations2/statusbar/ inflating: Configurations2/accelerator/current.xml creating: Configurations2/floater/ creating: Configurations2/popupmenu/ creating: Configurations2/progressbar/ creating: Configurations2/menubar/ creating: Configurations2/toolbar/ creating: Configurations2/images/Bitmaps/ inflating: layout-cache inflating: content.xml inflating: styles.xml extracting: meta.xml inflating: Thumbnails/thumbnail.png inflating: settings.xml inflating: META-INF/manifest.xml Removing Report_2_draft.odt Creating a Pictures directory Pre-processing the contents Sweaving content.Rnw Writing to file content_1.xml Processing code chunks ... 1 : term hide(label=loadData) d 2 : term verbatim(label=SiteHist) ate() 3 : term verbatim(label=AgeSex) 4 : term verbatim(label=Sitesex) 5 : term verbatim(label=SiteHeadNeck) 6 : term verbatim(label=SiteFace) 7 : term verbatim(label=SiteChest) 8 : term verbatim(label=SiteAbdomnen) 9 : term verbatim(label=SiteGCS_Eyes) 10 : term verbatim(label=SiteGCS_Verbal) 11 : term verbatim(label=SiteGCS_Motor) 12 : term verbatim(label=SiteGCS_total) 13 : term verbatim(label=SBP) 14 : term verbatim(label=DBP) 15 : term verbatim(label=HR) 16 : term verbatim(label=RESPIRATION) 17 : term verbatim(label=PF_ADMIT) 18 : term verbatim(label=O2_admit) 19 : term verbatim(label=Ph_admit) 20 : term verbatim(label=DEFICIT) 21 : term verbatim(label=lactic_acid) 'content_1.xml' has been Sweaved Removing content.xml Post-processing the contents Error in .Call("RS_XML_Parse", file, handlers, endElementHandlers, as.logical(addContext), : attempt to apply non-function In addition: There were 50 or more warnings (use warnings() to see the first 50) > date() [1] "Thu Oct 23 12:18:18 2008"
Sender: r-help-bounces at r-project.org On-Behalf-Of: rob at aetiologic.ca Subject: [R] odfWeave error Message-Id: <4900D150.80003 at aetiologic.ca> Recipient: nalbicelli at tricadiacdpcmanagement.com -------------------------------------------------------- This information is being sent at the recipient's request or with their specific understanding. The recipient acknowledges that by sending this information via electronic means, there is no absolute assurance that the information will be free from third party access, use, or further dissemination. This e-mail contains information that is privileged and/or confidential and may be subject to legal restrictions and penalties regarding its unauthorized disclosure or other use. You are prohibited from copying, distributing or otherwise using this information if you are not the intended recipient. Past performance is not necessarily indicative of future results. This is not an offer of or the solicitation for any security which will be made only by private placement memorandum that may be obtained from the applicable hedge fund. If you have received this e-mail in error, please notify us immediately by return e-mail and delete this e-mail and all attachments from your system. Thank You. -------------- next part -------------- An embedded message was scrubbed... From: Rob James <rob at aetiologic.ca> Subject: [R] odfWeave error Date: Thu, 23 Oct 2008 12:32:32 -0700 Size: 6544 URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20081023/f2e57233/attachment-0003.mht>
On 10/23/2008 3:32 PM, Rob James wrote:> odfWeave is throwing up a cryptic error, after successfully processing a > file with a large number of figures (~30) and many \Sexpr{} calls. The > error is (at least to me) cryptic. I am not sure where to look to > correct this problem. > > Here's the error: > > > Post-processing the contents > Error in .Call("RS_XML_Parse", file, handlers, endElementHandlers, > as.logical(addContext), : > attempt to apply non-functionThat's a relatively difficult error to get: I think you usually need to be messing around with expressions to see it. You can also get it in simpler ways with nonsensical expressions, like > 1(1) Error: attempt to apply non-function I'd say you'll need to do a traceback() to find out where this is coming from. It's probably also worthwhile to track down those warnings() that you were told about. Duncan Murdoch> > > Is there any way to figure out what this means, or where I might look > for the error in the source? > > Here's a capture of the associated log. I am running R 2.8 under Ubuntu > 8.04. > > > Thanks, > > > > odfWeave("/home/rob/Trauma/Report_2_draft.odt", > "/home/rob/Trauma/Report_2_draft_out.odt") > Copying /home/rob/Trauma/Report_2_draft.odt > Setting wd to /tmp/Rtmp2tlRz0/odfWeave23115040235 > Unzipping ODF file using unzip -o Report_2_draft.odt > Archive: Report_2_draft.odt > extracting: mimetype > creating: Configurations2/statusbar/ > inflating: Configurations2/accelerator/current.xml > creating: Configurations2/floater/ > creating: Configurations2/popupmenu/ > creating: Configurations2/progressbar/ > creating: Configurations2/menubar/ > creating: Configurations2/toolbar/ > creating: Configurations2/images/Bitmaps/ > inflating: layout-cache > inflating: content.xml > inflating: styles.xml > extracting: meta.xml > inflating: Thumbnails/thumbnail.png > inflating: settings.xml > inflating: META-INF/manifest.xml > > Removing Report_2_draft.odt > Creating a Pictures directory > > Pre-processing the contents > Sweaving content.Rnw > > Writing to file content_1.xml > Processing code chunks ... > 1 : term hide(label=loadData) > d 2 : term verbatim(label=SiteHist) > ate() > 3 : term verbatim(label=AgeSex) > 4 : term verbatim(label=Sitesex) > 5 : term verbatim(label=SiteHeadNeck) > 6 : term verbatim(label=SiteFace) > 7 : term verbatim(label=SiteChest) > 8 : term verbatim(label=SiteAbdomnen) > 9 : term verbatim(label=SiteGCS_Eyes) > 10 : term verbatim(label=SiteGCS_Verbal) > 11 : term verbatim(label=SiteGCS_Motor) > 12 : term verbatim(label=SiteGCS_total) > 13 : term verbatim(label=SBP) > 14 : term verbatim(label=DBP) > 15 : term verbatim(label=HR) > 16 : term verbatim(label=RESPIRATION) > 17 : term verbatim(label=PF_ADMIT) > 18 : term verbatim(label=O2_admit) > 19 : term verbatim(label=Ph_admit) > 20 : term verbatim(label=DEFICIT) > 21 : term verbatim(label=lactic_acid) > > 'content_1.xml' has been Sweaved > > Removing content.xml > > Post-processing the contents > Error in .Call("RS_XML_Parse", file, handlers, endElementHandlers, > as.logical(addContext), : > attempt to apply non-function > In addition: There were 50 or more warnings (use warnings() to see the > first 50) > > date() > [1] "Thu Oct 23 12:18:18 2008" > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Rob James <rob <at> aetiologic.ca> writes:> Post-processing the contents > Error in .Call("RS_XML_Parse", file, handlers, endElementHandlers, > as.logical(addContext), : > attempt to apply non-function >This might be similar to: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/135891.html and could happen if you use umlauts or other special characters. You might try to download XML 1.9.0 (older version) to check if it is the problem. Dieter
Rob,> Post-processing the contents > Error in .Call("RS_XML_Parse", file, handlers, endElementHandlers, > as.logical(addContext), : > attempt to apply non-functionCan you do these three things? 1. Send the results of sessionInfo()? 2. Try to run the code in the code chunks outside of odfWeave and make sure that they work. 3. Send me an odt file that reproduces the error (blind the data etc) Thanks, Max