Can't save notebook "error creating notebook: values must be length 1, but FUN(X[[8]]) is length 4"

I am getting this error repeatedly in different notebooks. It seems to appear randomly and once it appears I can't get rid of it. I'm creating R Notebooks with html_notebook output. Many chunks. Preview works fine, and then one day I make a minor edit and get this error when I try to Preview or save .... game over. I have to start with a new notebook and copy the chunks across. I have tried binary chopping to see if there is one chunk which causes it, but don't get consistent results even when starting with 2 copies of the same file. It's like there's some hidden control section which has become corrupted and you have to try again.

Any ideas? This is on Windows.

Note, I am not using in-line expression and have checked my use of backticks to make sure they all match up.

Any ideas? This is happening over and over again across different version of R and R-Studio on Windows.

I'm starting to think this might be something to do with network security and our VPN. I often get a security error because of a cross-origin script message which may or may not be related. Anyhow today I'm not using the VPN and I haven't had any errors. We'll see how it goes.

Possibly something on your environment yes. Did you try updating to latest RStudio version ?

Yes, I have the latest version of R-Studio. I have stopped using the VPN for the time being, and so far it has not reoccurred. I have also been using the save disk icon instead of clicking the Preview button just in case that make a difference.

I'm still having this problem without using the VPN. This time the error message refers to FUN(x[[32]]).

The document will knit ok to html, but a save or Preview operation fails.

Unfortunately I am not able to help further. Possibly something in your environment.

If you can produce an example that I can run then I can have a look and see if I can reproduce

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.