[R-pkg-devel] URL syntax causes R CMD build failure - a fix

Uwe Ligges ||gge@ @end|ng |rom @t@t|@t|k@tu-dortmund@de
Sun Sep 3 16:29:07 CEST 2023


John can you point us to an example?
Where is it in your package and what is the R CMD check output?

Guess: Within an Rd file you have to escape the %  characters otherwise 
they start a comment.

Best,
Uwe Ligges



On 03.09.2023 00:30, Spencer Graves wrote:
> I've encountered similar issues. However, it has been long enough ago 
> that I don't remember enough details to say more without trying to 
> update my CRAN packages to see what messages I get and maybe researching 
> my notes from previous problems of this nature. Spencer Graves
> 
> 
> On 9/2/23 4:23 PM, Greg Hunt wrote:
>> The percent encoded characters appear to be valid in that URL, suggesting
>> that rejecting them is an error. That kind of error could occur when the
>> software processing them converts them back to a non-unicode character 
>> set.
>>
>> On Sun, 3 Sep 2023 at 4:34 am, J C Nash <profjcnash using gmail.com> wrote:
>>
>>> I'm posting this in case it helps some other developers getting build
>>> failure.
>>>
>>> Recently package nlsr that I maintain got a message that it failed to
>>> build on
>>> some platforms. The exact source of the problem is still to be 
>>> illuminated,
>>> but seems to be in knitr::render and/or pandoc or an unfortunate
>>> interaction.
>>> An update to pandoc triggered a failure to process a vignette that 
>>> had been
>>> happily processed for several years. The error messages are 
>>> unhelpful, at
>>> least
>>> to me,
>>>
>>>      Error at "nlsr-devdoc.knit.md" (line 5419, column 1):
>>>      unexpected end of input
>>>      Error: pandoc document conversion failed with error 64
>>>      Execution halted
>>>
>>> Unfortunately, adding "keep_md: TRUE" (you need upper case TRUE to 
>>> save it
>>> when
>>> there is no error of this type), did not save the intermediate file 
>>> in this
>>> case. However, searching for "pandoc error 64" presented one web page
>>> where the author
>>> used brute force search of his document by removing / replacing sections
>>> to find
>>> the line(s) that caused trouble. This is a little tedious, but 
>>> effective.
>>> In my
>>> case, the offending line turned out to be a copied and pasted URL
>>>
>>> https://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm
>>>
>>> The coded characters can be replaced by a hyphen, to give,
>>>
>>> https://en.wikipedia.org/wiki/Levenberg-Marquardt_algorithm
>>>
>>> and this, when pasted in Mozilla Firefox at least, will go to the
>>> appropriate
>>> wikipedia page.
>>>
>>> I'd be interested in hearing from others who have had similar
>>> difficulties. I
>>> suspect this is relatively rare, and causing some sort of infelicity 
>>> in the
>>> output of knitr::render that then trips up some versions of pandoc, that
>>> may,
>>> for instance, be now applying stricter rules to URL syntax.
>>>
>>> Best,
>>>
>>> John Nash
>>>
>>> ______________________________________________
>>> R-package-devel using r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>>>
>>
>>     [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-package-devel using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list