problems in knitting to html

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

problems in knitting to html

tring
Dear friends - newly installed windows 10 and R version 4.0.5
(2021-03-31) -- "Shake and Throw" and newest version of RStudio I tend
to get an error when knitting to html.

The message I get is ("applications-of-charge-balance-160421.rmd" is my
file name)

/output file: applications-of-charge-balance-160421.knit.md//
/

/then (in my translated Danish) //
/

/Error in file(con,   "w") : cannot open connection/

/call: <Anonymous> ... extract_preserve_chunks -> write_utf8 ->
writeLines -> file//
/

/In file(con, "w") ://
//  cannot open file 'applications-of-charge-balance-160421.utf8.md':
Invalid argument//
//run aborted/

But when I then simply try again it works well with no troubles.

I wonder what error I have done?

All best wishes

Troels Ring,
Aalborg, Denmark



        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: problems in knitting to html

Yihui Xie-2
Could you provide a minimal reproducible example along with your
xfun::session_info('rmarkdown')? Thanks!

Regards,
Yihui
--
https://yihui.org

On Tue, Apr 20, 2021 at 11:06 AM Troels Ring <[hidden email]> wrote:

>
> Dear friends - newly installed windows 10 and R version 4.0.5
> (2021-03-31) -- "Shake and Throw" and newest version of RStudio I tend
> to get an error when knitting to html.
>
> The message I get is ("applications-of-charge-balance-160421.rmd" is my
> file name)
>
> /output file: applications-of-charge-balance-160421.knit.md//
> /
>
> /then (in my translated Danish) //
> /
>
> /Error in file(con,   "w") : cannot open connection/
>
> /call: <Anonymous> ... extract_preserve_chunks -> write_utf8 ->
> writeLines -> file//
> /
>
> /In file(con, "w") ://
> //  cannot open file 'applications-of-charge-balance-160421.utf8.md':
> Invalid argument//
> //run aborted/
>
> But when I then simply try again it works well with no troubles.
>
> I wonder what error I have done?
>
> All best wishes
>
> Troels Ring,
> Aalborg, Denmark
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: problems in knitting to html

tring
In reply to this post by tring
Thanks a lot - the error is not constant so I  have not tried a minimal
example yet but  the info is below, thanks a lot

Troels

xfun::session_info('rmarkdown') R version 4.0.5 (2021-03-31) Platform:
x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build
19042), RStudio 1.4.1106 Locale: LC_COLLATE=Danish_Denmark.1252
LC_CTYPE=Danish_Denmark.1252 LC_MONETARY=Danish_Denmark.1252
LC_NUMERIC=C LC_TIME=Danish_Denmark.1252 Package version:
base64enc_0.1.3 digest_0.6.27 evaluate_0.14 glue_1.4.2 graphics_4.0.5
grDevices_4.0.5 highr_0.8 htmltools_0.5.1.1 jsonlite_1.7.2 knitr_1.31
magrittr_2.0.1 markdown_1.1 methods_4.0.5 mime_0.10 rlang_0.4.10
rmarkdown_2.7 stats_4.0.5 stringi_1.5.3 stringr_1.4.0 tinytex_0.31
tools_4.0.5 utils_4.0.5 xfun_0.22 yaml_2.2.1 Pandoc version: 2.11.4


Den 20-04-2021 kl. 18:08 skrev Yihui Xie:

> Could you provide a minimal reproducible example along with your
> xfun::session_info('rmarkdown')? Thanks!
>
> Regards,
> Yihui
> --
> https://yihui.org
>
> On Tue, Apr 20, 2021 at 11:06 AM Troels Ring <[hidden email]> wrote:
>> Dear friends - newly installed windows 10 and R version 4.0.5
>> (2021-03-31) -- "Shake and Throw" and newest version of RStudio I tend
>> to get an error when knitting to html.
>>
>> The message I get is ("applications-of-charge-balance-160421.rmd" is my
>> file name)
>>
>> /output file: applications-of-charge-balance-160421.knit.md//
>> /
>>
>> /then (in my translated Danish) //
>> /
>>
>> /Error in file(con,   "w") : cannot open connection/
>>
>> /call: <Anonymous> ... extract_preserve_chunks -> write_utf8 ->
>> writeLines -> file//
>> /
>>
>> /In file(con, "w") ://
>> //  cannot open file 'applications-of-charge-balance-160421.utf8.md':
>> Invalid argument//
>> //run aborted/
>>
>> But when I then simply try again it works well with no troubles.
>>
>> I wonder what error I have done?
>>
>> All best wishes
>>
>> Troels Ring,
>> Aalborg, Denmark
>>
>>
>>
>>          [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: problems in knitting to html

Jeff Newmiller
I would encourage you to make _any_ kind of example that _ever_ has had this problem when asking for help on an intermittent error.

Also, are you running this in a cloud-backed directory such as OneDrive or Dropbox? These kinds of software can acquire exclusive access to intermediate files in an attempt to back them up rapidly, which can lead to race conditions between knitr and that software. Anti-virus software can also create this kind of issue.

On April 20, 2021 9:42:50 AM PDT, Troels Ring <[hidden email]> wrote:

>Thanks a lot - the error is not constant so I  have not tried a minimal
>
>example yet but  the info is below, thanks a lot
>
>Troels
>
>xfun::session_info('rmarkdown') R version 4.0.5 (2021-03-31) Platform:
>x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build
>19042), RStudio 1.4.1106 Locale: LC_COLLATE=Danish_Denmark.1252
>LC_CTYPE=Danish_Denmark.1252 LC_MONETARY=Danish_Denmark.1252
>LC_NUMERIC=C LC_TIME=Danish_Denmark.1252 Package version:
>base64enc_0.1.3 digest_0.6.27 evaluate_0.14 glue_1.4.2 graphics_4.0.5
>grDevices_4.0.5 highr_0.8 htmltools_0.5.1.1 jsonlite_1.7.2 knitr_1.31
>magrittr_2.0.1 markdown_1.1 methods_4.0.5 mime_0.10 rlang_0.4.10
>rmarkdown_2.7 stats_4.0.5 stringi_1.5.3 stringr_1.4.0 tinytex_0.31
>tools_4.0.5 utils_4.0.5 xfun_0.22 yaml_2.2.1 Pandoc version: 2.11.4
>
>
>Den 20-04-2021 kl. 18:08 skrev Yihui Xie:
>> Could you provide a minimal reproducible example along with your
>> xfun::session_info('rmarkdown')? Thanks!
>>
>> Regards,
>> Yihui
>> --
>> https://yihui.org
>>
>> On Tue, Apr 20, 2021 at 11:06 AM Troels Ring <[hidden email]> wrote:
>>> Dear friends - newly installed windows 10 and R version 4.0.5
>>> (2021-03-31) -- "Shake and Throw" and newest version of RStudio I
>tend
>>> to get an error when knitting to html.
>>>
>>> The message I get is ("applications-of-charge-balance-160421.rmd" is
>my
>>> file name)
>>>
>>> /output file: applications-of-charge-balance-160421.knit.md//
>>> /
>>>
>>> /then (in my translated Danish) //
>>> /
>>>
>>> /Error in file(con,   "w") : cannot open connection/
>>>
>>> /call: <Anonymous> ... extract_preserve_chunks -> write_utf8 ->
>>> writeLines -> file//
>>> /
>>>
>>> /In file(con, "w") ://
>>> //  cannot open file
>'applications-of-charge-balance-160421.utf8.md':
>>> Invalid argument//
>>> //run aborted/
>>>
>>> But when I then simply try again it works well with no troubles.
>>>
>>> I wonder what error I have done?
>>>
>>> All best wishes
>>>
>>> Troels Ring,
>>> Aalborg, Denmark
>>>
>>>
>>>
>>>          [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> 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.
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>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.

--
Sent from my phone. Please excuse my brevity.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: problems in knitting to html

Yihui Xie-2
In reply to this post by tring
It's hard to tell what's going on without a reproducible example.
Perhaps it was because of ant-virus software or a network drive as
Jeff guessed.

The development version of rmarkdown
(https://github.com/rstudio/rmarkdown) will no longer generate the
intermediate *.utf8.md file. I'm not sure if that would help. You may
try remotes::install_github('rstudio/rmarkdown').

Regards,
Yihui
--
https://yihui.org

On Tue, Apr 20, 2021 at 11:42 AM Troels Ring <[hidden email]> wrote:

>
> Thanks a lot - the error is not constant so I  have not tried a minimal example yet but  the info is below, thanks a lot
>
> Troels
>
> xfun::session_info('rmarkdown')
> R version 4.0.5 (2021-03-31)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> Running under: Windows 10 x64 (build 19042), RStudio 1.4.1106
>
> Locale:
>   LC_COLLATE=Danish_Denmark.1252  LC_CTYPE=Danish_Denmark.1252    LC_MONETARY=Danish_Denmark.1252
> LC_NUMERIC=C                    LC_TIME=Danish_Denmark.1252
>
> Package version:
>   base64enc_0.1.3   digest_0.6.27     evaluate_0.14     glue_1.4.2        graphics_4.0.5    grDevices_4.0.5
> highr_0.8         htmltools_0.5.1.1 jsonlite_1.7.2    knitr_1.31        magrittr_2.0.1    markdown_1.1
> methods_4.0.5     mime_0.10         rlang_0.4.10      rmarkdown_2.7     stats_4.0.5       stringi_1.5.3
> stringr_1.4.0     tinytex_0.31      tools_4.0.5       utils_4.0.5       xfun_0.22         yaml_2.2.1
>
> Pandoc version: 2.11.4
>
>
>
> Den 20-04-2021 kl. 18:08 skrev Yihui Xie:
>
> Could you provide a minimal reproducible example along with your
> xfun::session_info('rmarkdown')? Thanks!
>
> Regards,
> Yihui
> --
> https://yihui.org
>
> On Tue, Apr 20, 2021 at 11:06 AM Troels Ring <[hidden email]> wrote:
>
> Dear friends - newly installed windows 10 and R version 4.0.5
> (2021-03-31) -- "Shake and Throw" and newest version of RStudio I tend
> to get an error when knitting to html.
>
> The message I get is ("applications-of-charge-balance-160421.rmd" is my
> file name)
>
> /output file: applications-of-charge-balance-160421.knit.md//
> /
>
> /then (in my translated Danish) //
> /
>
> /Error in file(con,   "w") : cannot open connection/
>
> /call: <Anonymous> ... extract_preserve_chunks -> write_utf8 ->
> writeLines -> file//
> /
>
> /In file(con, "w") ://
> //  cannot open file 'applications-of-charge-balance-160421.utf8.md':
> Invalid argument//
> //run aborted/
>
> But when I then simply try again it works well with no troubles.
>
> I wonder what error I have done?
>
> All best wishes
>
> Troels Ring,
> Aalborg, Denmark
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: problems in knitting to html

tring
In reply to this post by tring
Thanks a lot to Jeff and Yihui -  it seems that only fairly large rmd
files have this problem, and yes, dropbox is running. So next time it
happens I'll remove it out of dropbox to see what happens. Otherwise
I'll try the development version, thanks Yihui!

BW

Troels


Den 20-04-2021 kl. 19:48 skrev Yihui Xie:

> It's hard to tell what's going on without a reproducible example.
> Perhaps it was because of ant-virus software or a network drive as
> Jeff guessed.
>
> The development version of rmarkdown
> (https://github.com/rstudio/rmarkdown) will no longer generate the
> intermediate *.utf8.md file. I'm not sure if that would help. You may
> try remotes::install_github('rstudio/rmarkdown').
>
> Regards,
> Yihui
> --
> https://yihui.org
>
> On Tue, Apr 20, 2021 at 11:42 AM Troels Ring <[hidden email]> wrote:
>> Thanks a lot - the error is not constant so I  have not tried a minimal example yet but  the info is below, thanks a lot
>>
>> Troels
>>
>> xfun::session_info('rmarkdown')
>> R version 4.0.5 (2021-03-31)
>> Platform: x86_64-w64-mingw32/x64 (64-bit)
>> Running under: Windows 10 x64 (build 19042), RStudio 1.4.1106
>>
>> Locale:
>>    LC_COLLATE=Danish_Denmark.1252  LC_CTYPE=Danish_Denmark.1252    LC_MONETARY=Danish_Denmark.1252
>> LC_NUMERIC=C                    LC_TIME=Danish_Denmark.1252
>>
>> Package version:
>>    base64enc_0.1.3   digest_0.6.27     evaluate_0.14     glue_1.4.2        graphics_4.0.5    grDevices_4.0.5
>> highr_0.8         htmltools_0.5.1.1 jsonlite_1.7.2    knitr_1.31        magrittr_2.0.1    markdown_1.1
>> methods_4.0.5     mime_0.10         rlang_0.4.10      rmarkdown_2.7     stats_4.0.5       stringi_1.5.3
>> stringr_1.4.0     tinytex_0.31      tools_4.0.5       utils_4.0.5       xfun_0.22         yaml_2.2.1
>>
>> Pandoc version: 2.11.4
>>
>>
>>
>> Den 20-04-2021 kl. 18:08 skrev Yihui Xie:
>>
>> Could you provide a minimal reproducible example along with your
>> xfun::session_info('rmarkdown')? Thanks!
>>
>> Regards,
>> Yihui
>> --
>> https://yihui.org
>>
>> On Tue, Apr 20, 2021 at 11:06 AM Troels Ring <[hidden email]> wrote:
>>
>> Dear friends - newly installed windows 10 and R version 4.0.5
>> (2021-03-31) -- "Shake and Throw" and newest version of RStudio I tend
>> to get an error when knitting to html.
>>
>> The message I get is ("applications-of-charge-balance-160421.rmd" is my
>> file name)
>>
>> /output file: applications-of-charge-balance-160421.knit.md//
>> /
>>
>> /then (in my translated Danish) //
>> /
>>
>> /Error in file(con,   "w") : cannot open connection/
>>
>> /call: <Anonymous> ... extract_preserve_chunks -> write_utf8 ->
>> writeLines -> file//
>> /
>>
>> /In file(con, "w") ://
>> //  cannot open file 'applications-of-charge-balance-160421.utf8.md':
>> Invalid argument//
>> //run aborted/
>>
>> But when I then simply try again it works well with no troubles.
>>
>> I wonder what error I have done?
>>
>> All best wishes
>>
>> Troels Ring,
>> Aalborg, Denmark
>>
>>
>>
>>          [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.